1

I trained pretrained GoogleNet(caffe) on Digits. The training went well and testing in Digits UI show no problem whatsoever. But when I export model and try to use example.py that digits provided. This error came up.

Cannot copy param 0 weights from layer 'conv1/7x7_s2/bn'; shape mismatc h. Source param shape is 1 64 1 1 (64); target param shape is 64 (64). To learn this layer's parameters from sc ratch rather than copying from a saved net, rename the layer.

I have checked the deploy.prototxt and train_val.prototxt. The dimension is correct.

Any suggestion?

Shai
  • 111,146
  • 38
  • 238
  • 371
asiandudeCom
  • 441
  • 1
  • 5
  • 26

1 Answers1

0

Try editing your 'deploy.prototxt' for layer 'conv1/7x7_s2/bn'. Add

param {
  share_mode: PERMISSIVE
}

For each of the trainable parameters of the layer.

See caffe.proto for more information.

Shai
  • 111,146
  • 38
  • 238
  • 371
  • Every layer in the deploy.prototxt? Why example.py of digits can't classify it. I mean I use digits to train but can't use example.py to test it. – asiandudeCom May 24 '18 at 12:27
  • @asiandudeCom you only need to add it to the `param` of the problematic layer. I don't know why you are getting this error - something about dimensionality... – Shai May 24 '18 at 12:31