Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

can't import into matlab #8

Open
meyert11 opened this issue Sep 18, 2022 · 1 comment
Open

can't import into matlab #8

meyert11 opened this issue Sep 18, 2022 · 1 comment

Comments

@meyert11
Copy link

layers = importCaffeLayers('MemNet_M6R6_80C64_train.prototxt')
Gives the error:
Error using nnet.internal.cnn.caffe.CaffeModelReader/importLayers (line 294)
The layer 'weight_output_end_01' specifies a Scale layer without a preceding BatchNorm layer. Scale layers are only supported when preceded by a BatchNorm layer.

Error in importCaffeLayers (line 73)
layers = importLayers(readerObj);

Using MatlabR2021a

@meyert11
Copy link
Author

Checked the Matlab forums and came across this explaination - "If we see the original paper of Batch Normalization, the author mentioned that, “we make sure that the transformation inserted in the network can represent the identity transform”. Without the Scale layer after the BatchNorm layer will not work, Since Caffe BatchNorm layer has no learnable parameters."

So it looks like the MemNet implimentation isn't supported in current Caffe format unfortunately, making it much more of a pain to port to Matlab, sigh. Oh well, was looking forward to playing around with this network! maybe if someone get's time and updates this, or uses a different wrapper... Cheers!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant