Neural network 如何通过CLI在Caffe中生成预测标签?

Neural network 如何通过CLI在Caffe中生成预测标签?,neural-network,deep-learning,caffe,Neural Network,Deep Learning,Caffe,我使用Caffe训练了一个神经网络模型: /home/f/caffe-master/build/tools/caffe train -solver=/media/my_solver.prototxt 然后,我在验证集上为所学模型打分: /home/f/caffe-master/build/tools/caffe test -model=/media/my_train_test.prototxt -weig

我使用Caffe训练了一个神经网络模型:

/home/f/caffe-master/build/tools/caffe train -solver=/media/my_solver.prototxt
然后,我在验证集上为所学模型打分:

/home/f/caffe-master/build/tools/caffe test -model=/media/my_train_test.prototxt 
                                            -weights model.caffemodel -iterations 100
但是如何在Caffe中得到训练好的神经网络模型预测的标签呢


我知道我可以为此使用Python或Matlab绑定,但我很想知道我们是否可以通过命令行界面直接在Caffe中获得预测的标签

在中似乎没有提到,查看
caffe
的帮助也没有帮助:

> f@f-VirtualBox:~/caffe/caffe-master/build/tools$ ./caffe
caffe: command line brew
usage: caffe <command> <args>

commands:
  train           train or finetune a model
  test            score a model
  device_query    show GPU diagnostic information
  time            benchmark model execution time

  Flags from /home/f/caffe-master/tools/caffe.cpp:
    -gpu (Run in GPU mode on given device ID.) type: int32 default: -1
    -iterations (The number of iterations to run.) type: int32 default: 50
    -model (The model definition protocol buffer text file..) type: string
      default: ""
    -snapshot (Optional; the snapshot solver state to resume training.)
      type: string default: ""
    -solver (The solver definition protocol buffer text file.) type: string
      default: ""
    -weights (Optional; the pretrained weights to initialize finetuning. Cannot
      be set simultaneously with snapshot.) type: string default: ""
>f@f-VirtualBox:~/caffe/caffe master/build/tools$。/caffe
caffe:命令行brew
用法:咖啡
命令:
训练或微调模型
模型的测试分数
设备查询显示GPU诊断信息
时间基准模型执行时间
来自/home/f/caffe master/tools/caffe.cpp的标志:
-gpu(在给定设备ID上以gpu模式运行)类型:int32默认值:-1
-迭代次数(要运行的迭代次数。)类型:int32默认值:50
-模型(模型定义协议缓冲区文本文件..)类型:字符串
默认值:“
-快照(可选;恢复训练的快照解算器状态。)
类型:字符串默认值:“”
-解算器(解算器定义协议缓冲区文本文件。)类型:字符串
默认值:“
-权重(可选;初始化微调的预训练权重。无法
与快照同时设置。)类型:字符串默认值:“”

如果不想使用Python,可以添加一个层:它会将预测的输出保存在HDF5文件中


否则,如果您想进入代码,可以打印或保存
bottom\u data\u vector[k]。其次,如果您不想使用Python,可以添加一个层:它将预测的输出保存在HDF5文件中

否则,如果您想输入代码,可以打印或保存
bottom\u data\u vector[k]。第二个