【发布时间】:2018-04-11 10:05:37
【问题描述】:
我想在我的数据上运行Deconvnet,但它似乎是为另一个版本的caffe 编写的。有谁知道如何更改batch_params?
Deconvnet 中的那个
layers { bottom: 'conv1_1' top: 'conv1_1' name: 'bn1_1' type: BN
bn_param { scale_filler { type: 'constant' value: 1 }
shift_filler { type: 'constant' value: 0.001 }
bn_mode: INFERENCE } }
Caffe 为cifar10 提供的例子:
layer {
name: "bn1"
type: "BatchNorm"
bottom: "pool1"
top: "bn1"
batch_norm_param {
use_global_stats: true
}
param {
lr_mult: 0
}
param {
lr_mult: 0
}
param {
lr_mult: 0
}
include {
phase: TEST
}
}
一旦我想运行它,首先显示以下错误:
I1029 13:46:47.156885 11601 solver.cpp:87] Creating training net from net file: train_val.prototxt
[libprotobuf ERROR google/protobuf/text_format.cc:299] Error parsing text-format caffe.NetParameter: 59:3: Unknown enumeration value of "BN" for field "type".
F1029 13:46:47.157971 11601 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param)
将BN改成BatchNorm后,出现新的参数错误:
I1029 14:03:38.497725 12097 solver.cpp:87] Creating training net from net file: train_val.prototxt
[libprotobuf ERROR google/protobuf/text_format.cc:299] Error parsing text-format caffe.NetParameter: 59:3: Unknown enumeration value of "BatchNorm" for field "type".
F1029 14:03:38.503345 12097 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param)
有人试过训练 Deconvnet 吗?如果是的话,你能指导我吗? 谢谢
【问题讨论】:
-
您似乎使用的是旧的 caffe 版本。请重新设置为最新的
master版本,然后尝试使用type: "BatchNorm" -
至于scale和bias/shift,需要额外添加
"Scale"层。请参阅this thread 了解更多信息。 -
我在 3 个月前几乎是从 caffe 网站的 master 分支安装的。感谢帮助。会尝试
-
您的 caffe 似乎将
"type"视为枚举而不是字符串:枚举在旧版本中使用,不再使用。 -
第一个来自
Deconvnet,我没有更改,我只是想知道我应该对他们的代码做什么样的更改。我的 caffe 版本是1.0.0
标签: caffe conv-neural-network image-segmentation pycaffe batch-normalization