TensorFlow 遇到的问题(二)

来源:互联网 发布:期货信息软件 编辑:程序博客网 时间:2024/05/29 04:40

关键字:tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot parse tensor from proto: dtype: DT_FLOAT

File "D:\PY\pyproject\Res_Cnn\renet\cell.py", line 181, in <module>  tf.app.run()File "C:\Users\asus pc\AppData\Local\Programs\Python\Python35\Lib\site-packages\tensorflow\python\platform\app.py", line 48, in run  _sys.exit(main(_sys.argv[:1] + flags_passthrough))File "D:\PY\pyproject\Res_Cnn\renet\cell.py", line 175, in main  train()File "D:\PY\pyproject\Res_Cnn\renet\cell.py", line 50, in train  sess.run(init) #todo current bug pointFile "C:\Users\asus pc\AppData\Local\Programs\Python\Python35\Lib\site-packages\tensorflow\python\client\session.py", line 895, in run  run_metadata_ptr)File "C:\Users\asus pc\AppData\Local\Programs\Python\Python35\Lib\site-packages\tensorflow\python\client\session.py", line 1124, in _run  feed_dict_tensor, options, run_metadata)File "C:\Users\asus pc\AppData\Local\Programs\Python\Python35\Lib\site-packages\tensorflow\python\client\session.py", line 1321, in _do_run  options, run_metadata)File "C:\Users\asus pc\AppData\Local\Programs\Python\Python35\Lib\site-packages\tensorflow\python\client\session.py", line 1340, in _do_call  raise type(e)(node_def, op, message)tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot parse tensor from proto: dtype: DT_FLOATtensor_shape {dim {size: 524288}dim {size: 4096}}float_val: 0

解决方式:意思是524288维度的tensor对于内存来说太大,你的内存不够,把网路维度减小就能解决,我的情况是在全连接层前面加了一层池化把维度减小了

原创粉丝点击