residual-attention-network icon indicating copy to clipboard operation
residual-attention-network copied to clipboard

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

Open hackerekcah opened this issue 7 years ago • 3 comments

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: ***

hackerekcah avatar Dec 07 '17 03:12 hackerekcah

Hello How to deal with problem. Thank you

liuajian avatar Dec 14 '17 00:12 liuajian

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

hackerekcah avatar Dec 14 '17 01:12 hackerekcah

@hackerekcah It is ok ! Thank you very much!

liuajian avatar Dec 14 '17 01:12 liuajian