'格拉夫'对象没有属性' SerializeToString'在Windows Docker上

时间:2016-06-22 11:48:08

标签: python windows docker tensorflow

我正在尝试运行教程:https://www.tensorflow.org/versions/master/tutorials/mnist/tf/index.html

我收到以下错误消息:

root@db411995c219:~/pjh# python fully_connected_feed.py

Extracting data/train-images-idx3-ubyte.gz
Extracting data/train-labels-idx1-ubyte.gz
Extracting data/t10k-images-idx3-ubyte.gz
Extracting data/t10k-labels-idx1-ubyte.gz
Traceback (most recent call last):
  File "fully_connected_feed.py", line 231, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/default/_app.py", line 30, in run
    sys.exit(main(sys.argv))
  File "fully_connected_feed.py", line 227, in main
    run_training()
  File "fully_connected_feed.py", line 164, in run_training
    summary_writer = tf.train.SummaryWriter(FLAGS.train_dir, sess.graph)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/summary_io.py", line 104, in __init__
    self.add_graph(graph_def)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/summary_io.py", line 168, in add_graph
    graph_bytes = graph_def.SerializeToString()
**AttributeError: 'Graph' object has no attribute 'SerializeToString'**

我该如何解决这个问题?

其他信息: 我使用docker镜像命令:

docker run -it b.gcr.io/tensorflow/tensorflow:latest-devel

但是我得到了TensorFlow 0.7.1的版本。

>>> import tensorflow as tf
>>> print(tf.__version__)
0.7.1

最新的泊坞窗图片名称是什么?

1 个答案:

答案 0 :(得分:0)

我自己找到了解决方案。

FOR /f "tokens=*" %i IN ('docker-machine env --shell cmd vdocker') DO %i    
docker run -it tensorflow/tensorflow:r0.9-devel

标签列表在此网站上:
https://hub.docker.com/r/tensorflow/tensorflow/
https://hub.docker.com/r/tensorflow/tensorflow/tags/