欢迎访问 生活随笔!

ag凯发k8国际

当前位置: ag凯发k8国际 > 人工智能 > caffe >内容正文

caffe

caffe模型文件解析-ag凯发k8国际

发布时间:2024/7/5 caffe 28 豆豆
ag凯发k8国际 收集整理的这篇文章主要介绍了 caffe模型文件解析_caffe imagedata神经网络基本示例无法解析模型文件 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

我正在尝试使用我使用caffe库从csv文件准备的 **_图像数据_** 构建神经网络的最小示例。

i am trying to build a minimal example of a neural network with **_image data_** that i have prepared from a csv file using the caffe libraries.

我的原始文本如下:\[wine\_train.prototxt\]

my prototext is as follows: \[wine\_train.prototxt\]

name:"wineclass"

layers {

name: "data"

type: "imagedata"

top: "data"

top: "label"

image_data_param {

source: "examples/wine/test.txt"

batch_size: 10

}

include{

phase:test

}

}

layer {

name: "data"

type: "imagedata"

top: "label"

top: "label"

image_data_param {

source: "examples/wine/train.txt"

batch_size: 2

}

include{

phase:train

}

}

layers {

name: "ip"

type: "inner_product"

bottom: "data"

top: "ip"

inner_product_param {

num_output: 3

}

}

layers {

name: "loss"

type: "softmax_loss"

bottom: "ip"

bottom: "label"

top: "loss"

}

layer {

name: "accuracy"

type: "accuracy"

bottom: "ip"

bottom: "label"

top: "accuracy"

include {

phase: test

}

}

我的求解器如下:

and my solver is as follows:

net: "examples/wine/wine_train.prototxt"

test_iter: 250

test_interval: 1000

base_lr: 0.01

lr_policy: "step"

gamma: 0.1

stepsize: 5000

display: 1000

max_iter: 10000

momentum: 0.9

weight_decay: 0.0005

snapshot: 10000

snapshot_prefix: "wine/train"

solver_mode: cpu

每次出现以下错误:

each time i get the following error:

ligh@ivip2:~/caffe$ build/tools/caffe train -model '/home/shaunak/caffe/examples/wine/wine_train.prototxt' -solver '/home/shaunak/caffe/examples/wine/solver.prototxt'

i0415 04:31:00.154145 57047 caffe.cpp:117] use cpu.

i0415 04:31:00.154485 57047 caffe.cpp:121] starting optimization

i0415 04:31:00.154552 57047 solver.cpp:32] initializing solver from parameters:

test_iter: 250

test_interval: 1000

base_lr: 0.01

display: 1000

max_iter: 10000

lr_policy: "step"

gamma: 0.1

momentum: 0.9

weight_decay: 0.0005

stepsize: 5000

snapshot: 10000

snapshot_prefix: "wine/train"

solver_mode: cpu

net: "examples/wine/wine_train.prototxt"

i0415 04:31:00.154660 57047 solver.cpp:79] creating training net from net file: examples/wine/wine_train.prototxt

[libprotobuf error google/protobuf/text_format.cc:245] error parsing text-format caffe.netparameter: 4:9: expected integer or identifier.

f0415 04:31:00.154774 57047 upgrade_proto.cpp:928] check failed: readprotofromtextfile(param_file, param) failed to parse netparameter file: examples/wine/wine_train.prototxt

*** check failure stack trace: ***

@ 0x7f4a30766c3c google::logmessage::fail()

@ 0x7f4a30766b88 google::logmessage::sendtolog()

@ 0x7f4a3076658a google::logmessage::flush()

@ 0x7f4a30769521 google::logmessagefatal::~logmessagefatal()

@ 0x7f4a30b8b1ee caffe::readnetparamsfromtextfileordie()

@ 0x7f4a30b6dfa2 caffe::solver《》::inittrainnet()

@ 0x7f4a30b6ee63 caffe::solver《》::init()

@ 0x7f4a30b6f036 caffe::solver《》::solver()

@ 0x40c3c0 caffe::getsolver《》()

@ 0x406361 train()

@ 0x4048f1 main

@ 0x7f4a2fe86ec5 (unknown)

@ 0x404e9d (unknown)

aborted (core dumped)

ligh@ivip2:~/caffe$

错误确切说明了什么以及如何解决?

what exactly does the error say and how do i resolve it?

总结

以上是ag凯发k8国际为你收集整理的caffe模型文件解析_caffe imagedata神经网络基本示例无法解析模型文件的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得ag凯发k8国际网站内容还不错,欢迎将ag凯发k8国际推荐给好友。

  • 上一篇:
  • 下一篇:
网站地图