yonghenglh6 / DepthwiseConvolution

A personal depthwise convolution layer implementation on caffe by liuhao.(only GPU)
525 stars 185 forks source link

how to change the two super-parameters ?And, trian time #17

Closed Ai-is-light closed 6 years ago

Ai-is-light commented 6 years ago

how to change the two super-parameters ?and, why the train time of depth-wise convolution is longer than the same out number of convolution?

Ai-is-light commented 6 years ago

@yonghenglh6 the time of GPUPerformance on example net in your repository is the train time or the test time? Thanks for your excellent work

yonghenglh6 commented 6 years ago

which two parameters? The parameter usage is same as original conv's, except the group num which must be set to input channel. Please assure the group number is set both in two nets. This implement is a temporary patch in origin caffe, so the speed is not the fastest. The time I post consist of both forward and backward time, which is same between train and test.

Ai-is-light commented 6 years ago

@yonghenglh6 Thanks for your answer and your good work. I have the other question about the time. The time you post is really faster, however, is there any other setting in the prototxt , like the https://github.com/shicai/MobileNet-Caffe/issues/13 , and setting the egine:CAFFE in the convolution layer of the train.prototxt. I'm really confused about the speed , although I follow the work of you, I can't really accelerate the train speed. I even observed the time of DepthWIseConvolution is more consuming than the normal Convolution at the same input, output, the kernel size,padding setting and stride. I wonder whether is different setting about the GPU or others? Thanks, any suggestion is needed and welcome

Ai-is-light commented 6 years ago

The two parameters, I mean the width multiplier and the resolution multiplier. we have to set them by hand?

yonghenglh6 commented 6 years ago

"I even observed the time of DepthWIseConvolution is more consuming than the normal Convolution at the same input, output, the kernel size,padding setting and stride." Have you set the group param to input channel in both net?

Ai-is-light commented 6 years ago

no , I just set the group for the DepthWise convolution in the mobileNet, and in the VGG, I just use the convolution and not set the group in the prototxt

Ai-is-light commented 6 years ago

would you mind share your caffe, GPU, cudnn's type?Thanks

yonghenglh6 commented 6 years ago

caffe: origingpu: 1080 cudnn: 5.1

------------------ 原始邮件 ------------------ 发件人: "Yong"; 发送时间: 2018年1月16日(星期二) 上午10:04 收件人: "yonghenglh6/DepthwiseConvolution"; 抄送: "yonghenglh6"; "Mention"; 主题: Re: [yonghenglh6/DepthwiseConvolution] how to change the twosuper-parameters ?And, trian time (#17)

would you mind share your caffe, GPU, cudnn's type?Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Ai-is-light commented 6 years ago

Hey, I used the caffe time to test the time of the VGG-19, moblieNet and your works. Your work does really work well. input(224,224),1000classes # mini-batch=5 SoftmaxWithLoss |   | Ave forward/ms | Ave backward/ms | f-b total/ms VGG-19 | 40.5399 | 80.7256 | 121.335   | depth-wise mobileNet | 47.7849 | 56.7849 | 104.474   | mobileNet-original | 167.109 | 373.929 | 514.118

Ai-is-light commented 6 years ago

caffe:CMU; gpu:Tesla M40;cuda:8.0;cudnn:5.1

yonghenglh6 commented 6 years ago

Thank you