tensorflow运行报错收集

001:

问题描述:训练模型时,遇到此问题

tensorflow models api:ValueError: Tensor conversion requested dtype string for Tensor with dtype float32: 'Tensor("arg0:0", shape=(), dtype=float32, device=/device:CPU:0)'

问题分析:tfrecord存在问题

解决问题:

1. 检查 *.record文件名是否正确

2. 检查 *.config文件中关于 *.record 文件的填写是否正确

 

002:

问题描述:windows下执行train.py,遇到 no modul named 'pycocotools'

解决办法:pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI

补充:需要预先安装好git

003 :

ValueError: Variable foo/bar already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:

  File "D:\program\anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1470, in __init__
    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access
  File "D:\program\anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 2956, in create_op
    op_def=op_def)
  File "D:\program\anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)

产生原因:同一个空间,变量重命名

解决办法:换个图,tf.reset_default_graph()

 

你可能感兴趣的:(TensorFlow)