residual-attention-network
residual-attention-network copied to clipboard
compile your caffe code success but init a net from python caffe with your proto get error
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: ***
Hello How to deal with problem. Thank you
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 It is ok ! Thank you very much!