由于属性错误而无法为RCNN训练数据集?

时间:2019-11-14 08:23:04

标签: python tensorflow

我目前正在关注EdjeElectronics的教程:https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10#1-install-anaconda-cuda-and-cudnn,目前正在执行步骤6 :。运行培训。我以前有某些错误,但是我清除了它们,所以我生成了TFrecords,并且卡在了这里。image

为方便起见,如果需要附加任何文件,请告诉我。

1 个答案:

答案 0 :(得分:0)

contrib属性已从Tesnsorflow版本2中移出。 要使用版本1,请替换“ import tensorflow as tf”行,如下所示:

#import tensorflow as tf
import tensorflow.compat.v1 as tf #using v1 of tf

实际上,在查看此链接-https://www.tensorflow.org/guide/migrate时,有一行- 在TensorFlow 2.0中仍然可以运行未经修改的1.X代码(contrib除外)

链接转到页面https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md,该页面说明了每个contrib模块发生了什么情况。

您可以尝试将代码迁移到Tensorflow 2或您使用的任何版本。 另一种选择是卸载您的Tensorflow安装并使用版本1.x安装Tensorflow。