python – LSTM中的长期递归卷积网络纸张再现错误?

python – LSTM中的长期递归卷积网络纸张再现错误?,第1张

概述我正在尝试重现 Long-term Recurrent Convolutional Networks paper. 我使用了他们的given code.并按照他们的指示生成了单帧模型.但是当试图训练LSTM混合网络时,它失败了.我已经在instructions.中提到了必要的更改 我运行的命令是caffe train -solver lstm_solver_flow.prototxt -weigh 我正在尝试重现 Long-term Recurrent Convolutional Networks paper.

我使用了他们的given code.并按照他们的指示生成了单帧模型.但是当试图训练LSTM混合网络时,它失败了.我已经在instructions.中提到了必要的更改

我运行的命令是caffe train -solver lstm_solver_flow.prototxt -weights singleframe_flow / snaps / snapshots_singleFrame_flow_v2_iter_50000.caffemodel
我得到的输出是

I0323 18:16:30.685951  9123 net.cpp:205] This network produces output lossI0323 18:16:30.685967  9123 net.cpp:446] Collecting Learning Rate and Weight Decay.I0323 18:16:30.685976  9123 net.cpp:218] Network initialization done.I0323 18:16:30.685982  9123 net.cpp:219] Memory required for data: 817327112I0323 18:16:30.686339  9123 solver.cpp:42] Solver scaffolding done.I0323 18:16:30.686388  9123 caffe.cpp:86] Finetuning from singleframe_flow/snaps/snapshots_singleFrame_flow_v2_iter_50000.caffemodelI0323 18:16:33.377488  9123 solver.cpp:247] Solving lstm_jointsI0323 18:16:33.377518  9123 solver.cpp:248] Learning Rate Policy: stepI0323 18:16:33.391726  9123 solver.cpp:291] Iteration 0,Testing net (#0)Traceback (most recent call last):  file "/home/anilil/projects/lstm/lisa-caffe-public/examples/LRCN_activity_recognition/sequence_input_layer.py",line 220,in forward    new_result_data = [None]*len(self.batch_advancer.result['data']) KeyError: 'data'terminate called after throwing an instance of 'boost::python::error_already_set'*** Aborted at 1458753393 (unix time) try "date -d @1458753393" if you are using GNU date ***PC: @     0x7f243731bcc9 (unkNown)*** SIGABRT (@0x23a3) received by PID 9123 (TID 0x7f24389077c0) from PID 9123; stack trace: ***    @     0x7f243731bd40 (unkNown)    @     0x7f243731bcc9 (unkNown)    @     0x7f243731f0d8 (unkNown)    @     0x7f2437920535 (unkNown)    @     0x7f243791e6d6 (unkNown)    @     0x7f243791e703 (unkNown)    @     0x7f243791e976 (unkNown)    @     0x7f2397bb5bfd caffe::PythonLayer<>::Forward_cpu()    @     0x7f243821d87f caffe::Net<>::ForwardFromTo()    @     0x7f243821dca7 caffe::Net<>::ForwardPrefilled()    @     0x7f243822fd77 caffe::Solver<>::test()    @     0x7f2438230636 caffe::Solver<>::TestAll()    @     0x7f243823837b caffe::Solver<>::Step()    @     0x7f2438238d5f caffe::Solver<>::Solve()    @           0x4071c8 train()    @           0x405701 main    @     0x7f2437306ec5 (unkNown)    @           0x405cad (unkNown)    @                0x0 (unkNown)run_lstm_flow.sh: line 8:  9123 Aborted                 (core dumped) GLOG_logtostderr=1 $TOolS/caffe train -solver lstm_solver_flow.prototxt -weights singleframe_flow/snaps/snapshots_singleFrame_flow_v2_iter_50000.caffemodelDone.

这是我更改的sequence_input_layer.py和prototext文件.
我的输入训练和测试网络是这个format.

我认为主要问题是##重新排列数据:LSTM将输入视为[vIDeo0_frame0,vIDeo1_frame0,…],但数据当前排列为[vIDeo0_frame0,vIDeo0_frame1,…]

我无法解决这个问题让我很困惑.
但我可能错了.

解决方法 我知道我有点晚了,希望我的回答能帮助将来的某个人.我也遇到了同样的错误.问题出在scikit-image版本上.我使用的是比scikit-image 0.9.3更新的版本.以下行

processed_image = transformer.preprocess('data_in',data_in)

使用由lisa-caffe-public-lstm_vIDeo_deploy / python / caffe / io.py导入的scikit-image库函数.对于较新的版本,transformer.preprocess()崩溃,因此processImageCrop()函数没有返回,因此KeyError:’data’.

简而言之,你应该使用scikit-image-0.9.3来摆脱你的错误:)希望有帮助:)

总结

以上是内存溢出为你收集整理的python – LSTM中的长期递归卷积网络纸张再现错误?全部内容,希望文章能够帮你解决python – LSTM中的长期递归卷积网络纸张再现错误?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1197569.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-03
下一篇 2022-06-03

发表评论

登录后才能评论

评论列表(0条)

保存