基本上,我用的是caffe来进行深度学习。现在,我为自己的数据集创建了一个网络,并以hdf5格式保存了我的模型,即.h5扩展。
现在我想用matcaffe对图像进行分类。matcaffe只理解训练模型的.caffemodel格式。
那么,有没有办法将hdf5文件转换为caffemodel?
发布于 2016-06-27 06:06:41
您可以在solver.prototxt中为caffemodel文件设置首选格式。简单集
snapshot_format: BINARYPROTO有关详细信息,请参阅caffe.proto。
或者,您可以使用python接口(which is by far better than the matlab interface for caffe, IMHO):
import caffe
net = caffe.Net('/path/to/deploy.prototxt', '/path/to/caffemodel.h5', caffe.TEST)
net.save('/path/to/just.caffemodel')https://stackoverflow.com/questions/38038933
复制相似问题