7

我目前正在尝试使用 Caffe 训练我的第一个网络。我得到以下输出:

caffe train --solver=first_net_solver.prototxt
I0515 09:01:06.577710 15331 caffe.cpp:117] Use CPU.
I0515 09:01:06.578014 15331 caffe.cpp:121] Starting Optimization
I0515 09:01:06.578097 15331 solver.cpp:32] Initializing solver from parameters: 
test_iter: 1
test_interval: 1
base_lr: 0.01
display: 1
max_iter: 2
lr_policy: "inv"
gamma: 0.0001
power: 0.75
momentum: 0.9
weight_decay: 0
snapshot: 1
snapshot_prefix: "first_net"
solver_mode: CPU
net: "first_net.prototxt"
I0515 09:01:06.578203 15331 solver.cpp:70] Creating training net from net file: first_net.prototxt
E0515 09:01:06.578348 15331 upgrade_proto.cpp:609] Attempting to upgrade input file specified using deprecated transformation parameters: first_net.prototxt
I0515 09:01:06.578533 15331 upgrade_proto.cpp:612] Successfully upgraded file specified using deprecated data transformation parameters.
E0515 09:01:06.578549 15331 upgrade_proto.cpp:614] Note that future Caffe releases will only support transform_param messages for transformation fields.
E0515 09:01:06.578574 15331 upgrade_proto.cpp:618] Attempting to upgrade input file specified using deprecated V1LayerParameter: first_net.prototxt
I0515 09:01:06.578635 15331 upgrade_proto.cpp:626] Successfully upgraded file specified using deprecated V1LayerParameter
I0515 09:01:06.578729 15331 net.cpp:42] Initializing net from parameters: 
name: "first_net"
input: "data"
input_dim: 1
input_dim: 5
input_dim: 41
input_dim: 41
state {
  phase: TRAIN
}
layer {
  name: "data"
  type: "ImageData"
  top: "data2"
  top: "data-idx"
  transform_param {
    mirror: false
    crop_size: 41
  }
  image_data_param {
    source: "/home/moose/GitHub/first-net/data-images.txt"
  }
}
layer {
  name: "label-mask"
  type: "ImageData"
  top: "label-mask"
  top: "label-idx"
  transform_param {
    mirror: false
    crop_size: 41
  }
  image_data_param {
    source: "/home/moose/GitHub/first-net/labels-images.txt"
  }
}
layer {
  name: "assert-idx"
  type: "EuclideanLoss"
  bottom: "data-idx"
  top: "loss"
}

做什么

Attempting to upgrade input file specified using deprecated transform parameters / V1LayerParameter

意思是?我到底在哪里使用了已弃用的东西?我应该改用什么?

4

1 回答 1

8

最近,输入转换(缩放/裁剪等)从 IMAGE_DATA 层分离到一个单独的对象:数据转换器。此更改影响了 protobuffer 语法和 IMAGE_DATA 层的语法。

看起来好像您first_net.prototxt使用的是旧格式,Caffe 会为您将其转换为新格式。

您可以使用./build/tools/upgrade_net_proto_text(对于 prototxt 文件) 和./build/tools/upgrade_net_proto_binary(对于 binaryproto 文件) 手动进行此转换。

于 2015-05-17T09:41:34.193 回答