tensorflow attributeerror模块没有针对每个图像的属性标准化

2024-03-29 08:54:27 发布

您现在位置:Python中文网/ 问答频道 /正文

我试着用cifar10复习卷积神经网络教程。cnn正在构建中(cifar10.py),但当我尝试运行cifar10时_火车.py我得到以下错误:

Traceback (most recent call last):
  File "cifar10_train.py", line 115, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 30, in run
    sys.exit(main(sys.argv))
  File "cifar10_train.py", line 111, in main
    train()
  File "cifar10_train.py", line 58, in train
    images, labels = cifar10.distorted_inputs()
  File "/home/brennus/workspace/python/cifar/cifar10.py", line 141, in distorted_inputs
    batch_size=FLAGS.batch_size)
  File "/home/brennus/workspace/python/cifar/cifar10_input.py", line 177, in distorted_inputs
    float_image = tf.image.per_image_standardization(distorted_image)
AttributeError: 'module' object has no attribute 'per_image_standardization'

根据https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/api_docs/python/image.md,确实有一个per_image_标准化属性,但看起来我的tensorflow没有它。我不知道我有什么版本,也不知道在哪里可以找到它,但是我从存储库的源代码构建了它,所以我认为它是当前版本。在

我找不到其他人有这个问题,所以我很为难。也许我得自己写?在


Tags: runinpyimageapptftensorflowline