IntelLabs / SkimCaffe

Caffe for Sparse Convolutional Neural Network
Other
238 stars 64 forks source link

ResNet-50-train-val-gesl.prototxt #9

Open newwhitecheng opened 7 years ago

newwhitecheng commented 7 years ago

Hi, Can you provide models/resnet/ResNet-50-train-val-gesl.prototxt?

jspark1105 commented 7 years ago

Oops! I forgot to add those files. Thanks for pointing out. Now the necessary files to reproduce resnet-50 pruning results should be there. Please let me know if you encounter other issues.

newwhitecheng commented 7 years ago

I'm wondering why the sparse network has the same size as original one. Which are both 102Mb? have you ever try to sparsify and compress model? And When I test the speed on GPU, their speed performance are similar. Thanks!

jspark1105 commented 7 years ago

Hi, good question. Even if pruned model has lots of zeros we didn't take advantage of that when storing to files. This is because our main goal was reducing inference time, so the model stored in memory during inference is small. If model size stored in disk (or transferring over network) is important, we need to change the code to store the model in a different format taking advantage of the zeros. I'm not that familiar with hdf5 and so on, so I'd need some help here.

jspark1105 commented 7 years ago

Regarding speed up in GPU, I didn't optimize for GPU inference speed using the sparsity. In Xeon and Xeon Phi, you should be able to see speedups.

newwhitecheng commented 7 years ago

Thank you for you reply. Another question which is not related to this thread. Is it possible to use it on ARM cpu?

jspark1105 commented 7 years ago

Technically, yes. ARM also should be able to take advantage of sparsity to speed up inference but you'd need to implement an optimized sparse convolution similar to the one for x86 in sconv.hpp .