VGG16权值载入问题
vgg16_weights.h5:
输入图像为224*224并且完整模型时,出现以下情况:
File "h5a.pyx", line 77, in h5py.h5a.open (h5py/h5a.c:1945)
KeyError: "can't open attribute (Attribute: Can't open object)"
不包含全连接层以及输出层,对权值进行部分截取时,出现同样的情况
File "h5a.pyx", line 77, in h5py.h5a.open (h5py/h5a.c:1945)
KeyError: "can't open attribute (Attribute: Can't open object)"
weights_path='vgg16_weights_th_dim_ordering_th_kernels.h5'
层数不符合,该权重为22层?
CNN模型
ValueError: ('The specified size contains a dimension with value <= 0', (-1404928,))
修改keras.ios 添加data_format:channels_first
ImportError: ('The following error happened while compiling the node', CorrMM{valid, (1, 1), (1, 1)}(/conv2d_1_input, Subtensor{::, ::, ::int64, ::int64}.0), '\n', '/root/.theano/compiledir_Linux-3.2--generic-pae-i686-with-Ubuntu-12.04-precise-i686-2.7.3-32/tmpZ8GPET/8a007e82587ada653a006758e4b6a10f.so: undefined symbol: _gfortran_st_write', '[CorrMM{valid, (1, 1), (1, 1)}(/conv2d_1_input, )]')
解决方法1:
① 修改.theanorc文件 (当前路径下没有则创建,虽然我没有解决问题,但是有很多是这样解决的)
[blas]
ldflags =-lblas -lgfortran
2 对 theano/gof/cmodule.py