diagonalwise-refactorization-caffe
diagonalwise-refactorization-caffe copied to clipboard
About multiplier in depthwise layer
https://github.com/clavichord93/diagonalwise-refactorization-caffe/blob/219d4f5766c4465b6de7bbddae16178c7adc1cac/src/caffe/layers/base_depthwise_layer.cpp#L110 @clavichord93 你好,我看你caffe.proto中的参数ConvolutionParameter ,multiplier 是整型(uint32),所以在base_depthwise_layer.cpp中conv_out_channels_貌似就不会变小了?例如:假设我的conv_in_channels_为1024,我如果想将conv_out_channels_减小到512就没法通过conv_out_channels_=channels_ (1024)* multiplier_(0.5)设置,将multiplier 改成float是否更加合适?
In the original definition of depthwise convolution[1], multiplier is meant to expand the output channels of the depthwise layer (see also there).
For your question, it is okay to to add a squeeze multiplier to reduce the number of channels, but I recommend using a depthwise convolution with multiplier=1 followed by a pointwise convolution to squeeze the channels.
[1]Xception: Deep Learning with Depthwise Separable Convolutions (arXiv:1610.02357)