首页 > 其他 > 详细

summer of 2016错误及解决汇总(1)

时间:2016-08-22 18:22:56      阅读:636      评论:0      收藏:0      [点我收藏+]
读入Net时发生:
Error parsing text-format caffe.NetParameter: 64:7: Message type "caffe.LayerParameter" has no field named "layer".
Reson:
prototxt文件格式出错,line 64 缺少‘}’

python Visualize param:
=>plt.imshow()
TypeError: Invalid dimensions for image data
Reason:
plt.imshow() needs a 2D array (or a 3D array with the third dimension being of shape 3 or 4)!
# Assuming your array/image has the variable name: array

import numpy as np
np.asarray(array).ndim 
# If the result is 2 you can always use it with imshow

# If the result is 3 you need to check the third dimension:
np.asarray(array).shape[2] # Must be 3 or 4 for RGB or RGBA images

 

Train a reformed AlexNet,keep conv layer input size,transform fc layers to conv which kernel size is 1*1.But loss is shocking and Net cannot converge.

By visualizing each Layer parameters and Blob,find conv6/conv7(kernel = 1*1) parameters are all zero!

Reason:

conv6/conv7 in train_val.prototxt cannot initialize.

convolution_param {
 num_output: 1
 bias_term: false
 kernel_size: 16
 stride: 8
 pad: 4

 weight_filler {
  type: "gaussian"
  std: 0.01
 }
 bias_filler {
  type: "constant"
  value: 0.1
 }
}

Or:利用已有的caffemodel fine-tuning

在训练脚本中加上:-weights=models/bvlc_alexnet/bvlc_alexnet.caffemodel

 

summer of 2016错误及解决汇总(1)

原文:http://www.cnblogs.com/chanyn/p/5796407.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!