Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

compile your caffe code success but init a net from python caffe with your proto get error #9

Open
hackerekcah opened this issue Dec 7, 2017 · 3 comments

Comments

@hackerekcah
Copy link

import caffe
affe.set_mode_gpu()

net = caffe.Net("/path-to/Attention-56-dcase.prototxt",caffe.TRAIN)

got error:
I1207 11:37:31.168298 31752 layer_factory.hpp:77] Creating layer conv1/bn
F1207 11:37:31.168318 31752 layer_factory.hpp:81] Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: BN (known types: AbsVal, Accuracy, ArgMax, BNLL, BatchNorm, BatchReindex, Bias, Concat, ContrastiveLoss, Convolution, Crop, Data, Deconvolution, Dropout, DummyData, ELU, Eltwise, Embed, EuclideanLoss, Exp, Filter, Flatten, HDF5Data, HDF5Output, HingeLoss, Im2col, ImageData, InfogainLoss, InnerProduct, Input, Interp, LRN, LSTM, LSTMUnit, Log, MVN, MemoryData, MultinomialLogisticLoss, PReLU, Parameter, Pooling, Power, RNN, ReLU, Reduction, Reshape, SPP, Scale, Sigmoid, SigmoidCrossEntropyLoss, Silence, Slice, Softmax, SoftmaxWithLoss, Split, TanH, Threshold, Tile, WindowData)
*** Check failure stack trace: ***

@liuajian
Copy link

Hello How to deal with problem. Thank you

@hackerekcah
Copy link
Author

it seems BN layer is not registered, I added the following line before the end of src/layer/bn_layer.cpp:
REGISTER_LAYER_CLASS(BN)
then model is successfully compiled. hope it helps

@liuajian
Copy link

@hackerekcah It is ok !
Thank you very much!

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

No branches or pull requests

2 participants