我正在尝试在 pycaffe 中加载几个模型,以便我可以执行集成学习。我可以很好地加载 1 个模型并对其执行测试,但是当我尝试加载我的第二个模型时它就停止了。
我使用以下代码:
model_def_net0 = caffe_root + 'Dataset/net0/deploy.prototxt'
model_weights_net0 = caffe_root + 'Dataset/net0/net0_train_vgg_iter_250000.caffemodel'
net0 = caffe.Net(model_def_net0, # defines the structure of the model
model_weights_net0, # contains the trained weights
caffe.TEST) # use test mode (e.g., don't perform dropout)
model_def_caffe = caffe_root + 'Dataset/caffenet/deploy_3.prototxt'
model_weights_caffe = caffe_root + 'Dataset/caffenet/caffenet_train_iter_150000.caffemodel'
net1 = caffe.Net(model_def_caffe, # defines the structure of the model
model_weights_caffe, # contains the trained weights
caffe.TEST) # use test mode (e.g., don't perform dropout)
当我执行代码时,它会在尝试net1
在日志中加载以下内容时停止:
I0516 18:29:39.718916 7339 net.cpp:411] data -> data
I0516 18:29:39.718942 7339 net.cpp:411] data -> label