yahoo / open_nsfw

Not Suitable for Work (NSFW) classification using deep neural network Caffe models.
BSD 2-Clause "Simplified" License
5.86k stars 1.05k forks source link

if or not we need to delete the weight_filter{} and bias_filter in the deploy.prototxt? #71

Open yunhai0920 opened 6 years ago

yunhai0920 commented 6 years ago

if or not we need to delete the weight_filter{} and bias_filter{} in the deploy.prototxt? because during the test phase, the caffe.model will provide the named parameters, here not need to update itself.

TechnikEmpire commented 6 years ago

@yunhai0920 I saw on another website you had run into the following issue with this model:

Check failed: axis_index < num_axes() (1 vs. 1) axis 1 out of range for 1-D Blob with shape 2 (2)

Sorry to hijack your question, but what was your solution to this problem?

TechnikEmpire commented 6 years ago

Nevermind, the problem is all the crazy forking of Caffe and people not keeping their forks in sync.

This bug will cause OpenNSFW not to work, FYI.

https://github.com/BVLC/caffe/issues/6275 Fix is https://github.com/BVLC/caffe/pull/6278 Also here https://github.com/intel/caffe/issues/219

yunhai0920 commented 6 years ago

@TechnikEmpire because of the different versions of caffe, you can try to chang the input format: name: "ResNet_50_1by2_nsfw" layer { name: "data" type: "Input" top: "data" input_param { shape: { dim: 1 dim: 3 dim: 224 dim: 224 } } } vs name: "ResNet_50_1by2_nsfw" input: "data" input_shape { dim: 1 dim: 3 dim: 224 dim: 224 }