카테고리 없음

sparse kernel

김연호님 2017. 7. 20. 22:47
Dynamic network surgery is a very effective method for DNN pruning. To better use it with python and matlab, you may also need a classic version of the Caffe framework. For the convolutional and fully-connected layers to be pruned, change their layer types to "CConvolution" and "CInnerProduct" respectively. Then, pass "cconvlution_param" and "cinner_product_param" messages to these modified layers for better pruning performance.
layer {
  name: "ip1"
  type: "CInnerProduct"
  bottom: "pool2"
  top: "ip1"
  param {
    lr_mult: 1
  }
  param {
    lr_mult: 2
  }
  inner_product_param {
    num_output: 500
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
    }
  }
  cinner_product_param {
    gamma: 0.0001
    power: 1
    c_rate: 4
    iter_stop: 14000  
    weight_mask_filler {
      type: "constant"
      value: 1
    }
    bias_mask_filler {
      type: "constant"
      value: 1
    }        
  }   
}

출처 : https://github.com/yiwenguo/Dynamic-Network-Surgery