python实例变量不存在_Tensorflow多gpu示例错误:变量conv1/weights/ExponentialMovingAverage/不存在...

我在Ubuntu14.04上的AWS的g2.4xlarge机器上运行代码。单个gpu示例运行良好,没有任何错误。在

有人能帮忙解决这个问题吗?我运行的是0.12版本。在

在ubuntu@ip xxx xx xx xx用法:~/pythonworkspace/tensorflowdev/models master/tutorials/image/cifar10$python-c'将tensorflow作为tf导入;打印(tf.版本)'

0.12.头部

在ubuntu@ip xxx xx xx xx:~/pythonworkspace/tensorflowdev/models master/tutorials/image/cifar10$python cifar10_多个gpu_火车.py--num_gpu=2个>> Downloading cifar-10-binary.tar.gz 100.0%

Successfully downloaded cifar-10-binary.tar.gz 170052171 bytes.

Filling queue with 20000 CIFAR images before starting to train. This will take a few minutes.

WARNING:tensorflow:From /home/ubuntu/pythonworkspace/tensorflowdev/models-master/tutorials/image/cifar10/cifar10_input.py:135: image_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.

Instructions for updating:

Please switch to tf.summary.image. Note that tf.summary.image uses the node name instead of the tag. This means that TensorFlow will automatically de-duplicate summary names based on the scope they are created in. Also, the max_images argument was renamed to max_outputs.

Filling queue with 20000 CIFAR images before starting to train. This will take a few minutes.

WARNING:tensorflow:From /home/ubuntu/pythonworkspace/tensorflowdev/models-master/tutorials/image/cifar10/cifar10_input.py:135: image_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.

Instructions for updating:

Please switch to tf.summary.image. Note that tf.summary.image uses the node name instead of the tag. This means that TensorFlow will automatically de-duplicate summary names based on the scope they are created in. Also, the max_images argument was renamed to max_outputs.

Traceback (most recent call last):

File "cifar10_multi_gpu_train.py", line 273, in

tf.app.run()

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 44, in run

_sys.exit(main(_sys.argv[:1] + flags_passthrough))

File "cifar10_multi_gpu_train.py", line 269, in main

train()

File "cifar10_multi_gpu_train.py", line 210, in train

variables_averages_op = variable_averages.apply(tf.trainable_variables())

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/moving_averages.py", line 373, in apply

colocate_with_primary=True)

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py", line 110, in create_slot

return _create_slot_var(primary, val, "")

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py", line 64, in _create_slot_var

use_resource=_is_resource(primary))

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 1034, in get_variable

use_resource=use_resource, custom_getter=custom_getter)

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 933, in get_variable

use_resource=use_resource, custom_getter=custom_getter)

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 356, in get_variable

validate_shape=validate_shape, use_resource=use_resource)

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 341, in _true_getter

use_resource=use_resource)

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 671, in _get_single_variable

"VarScope?" % name)

ValueError: Variable conv1/weights/ExponentialMovingAverage/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值