The running result is as flowing:
D:\python351\python.exe "E:/Machine Learning/Tensorflow Code/example code/tensorflow-vdsr-master/VDSR.py"
287088
71772
use queue loading
WARNING:tensorflow:From E:/Machine Learning/Tensorflow Code/example code/tensorflow-vdsr-master/VDSR.py:142 in .: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use tf.global_variables_initializer
instead.
Traceback (most recent call last):
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 1021, in _do_call
return fn(*args)
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 999, in _run_fn
self._extend_graph()
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 1048, in _extend_graph
self._session, graph_def.SerializeToString(), status)
File "D:\python351\lib\contextlib.py", line 66, in exit
next(self.gen)
File "D:\python351\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 469, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device to node 'shared_model/conv_20_b/Adam_1': Could not satisfy explicit device specification '/device:GPU:0' because no devices matching that specification are registered in this process; available devices: /job:localhost/replica:0/task:0/cpu:0
Colocation Debug Info:
Colocation group had the following types and devices:
Variable: CPU
Identity: CPU
Const: CPU
Assign: CPU
ApplyAdam: CPU
[[Node: shared_model/conv_20_b/Adam_1 = Variable_class=["loc:@shared_model/conv_20_b"], container="", dtype=DT_FLOAT, shape=[1], shared_name="", _device="/device:GPU:0"]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:/Machine Learning/Tensorflow Code/example code/tensorflow-vdsr-master/VDSR.py", line 142, in
tf.initialize_all_variables().run()
File "D:\python351\lib\site-packages\tensorflow\python\framework\ops.py", line 1449, in run
_run_using_default_session(self, feed_dict, self.graph, session)
File "D:\python351\lib\site-packages\tensorflow\python\framework\ops.py", line 3668, in _run_using_default_session
session.run(operation, feed_dict)
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 766, in run
run_metadata_ptr)
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 964, in _run
feed_dict_string, options, run_metadata)
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 1014, in _do_run
target_list, options, run_metadata)
File "D:\python351\lib\site-packages\tensorflow\python\client\session.py", line 1034, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device to node 'shared_model/conv_20_b/Adam_1': Could not satisfy explicit device specification '/device:GPU:0' because no devices matching that specification are registered in this process; available devices: /job:localhost/replica:0/task:0/cpu:0
Colocation Debug Info:
Colocation group had the following types and devices:
Variable: CPU
Identity: CPU
Const: CPU
Assign: CPU
ApplyAdam: CPU
[[Node: shared_model/conv_20_b/Adam_1 = Variable_class=["loc:@shared_model/conv_20_b"], container="", dtype=DT_FLOAT, shape=[1], shared_name="", _device="/device:GPU:0"]]
Caused by op 'shared_model/conv_20_b/Adam_1', defined at:
File "E:/Machine Learning/Tensorflow Code/example code/tensorflow-vdsr-master/VDSR.py", line 121, in
opt = optimizer.minimize(loss, global_step=global_step)
File "D:\python351\lib\site-packages\tensorflow\python\training\optimizer.py", line 279, in minimize
name=name)
File "D:\python351\lib\site-packages\tensorflow\python\training\optimizer.py", line 393, in apply_gradients
self._create_slots(var_list)
File "D:\python351\lib\site-packages\tensorflow\python\training\adam.py", line 120, in _create_slots
self._zeros_slot(v, "v", self._name)
File "D:\python351\lib\site-packages\tensorflow\python\training\optimizer.py", line 593, in _zeros_slot
named_slots[var] = slot_creator.create_zeros_slot(var, op_name)
File "D:\python351\lib\site-packages\tensorflow\python\training\slot_creator.py", line 108, in create_zeros_slot
colocate_with_primary=colocate_with_primary)
File "D:\python351\lib\site-packages\tensorflow\python\training\slot_creator.py", line 86, in create_slot
return _create_slot_var(primary, val, scope)
File "D:\python351\lib\site-packages\tensorflow\python\training\slot_creator.py", line 50, in _create_slot_var
slot = variables.Variable(val, name=scope, trainable=False)
File "D:\python351\lib\site-packages\tensorflow\python\ops\variables.py", line 224, in init
expected_shape=expected_shape)
File "D:\python351\lib\site-packages\tensorflow\python\ops\variables.py", line 343, in _init_from_args
name=name)
File "D:\python351\lib\site-packages\tensorflow\python\ops\state_ops.py", line 163, in variable_op
container=container, shared_name=shared_name)
File "D:\python351\lib\site-packages\tensorflow\python\ops\gen_state_ops.py", line 686, in _variable
name=name)
File "D:\python351\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 759, in apply_op
op_def=op_def)
File "D:\python351\lib\site-packages\tensorflow\python\framework\ops.py", line 2240, in create_op
original_op=self._default_original_op, op_def=op_def)
File "D:\python351\lib\site-packages\tensorflow\python\framework\ops.py", line 1128, in init
self._traceback = _extract_stack()
InvalidArgumentError (see above for traceback): Cannot assign a device to node 'shared_model/conv_20_b/Adam_1': Could not satisfy explicit device specification '/device:GPU:0' because no devices matching that specification are registered in this process; available devices: /job:localhost/replica:0/task:0/cpu:0
Colocation Debug Info:
Colocation group had the following types and devices:
Variable: CPU
Identity: CPU
Const: CPU
Assign: CPU
ApplyAdam: CPU
[[Node: shared_model/conv_20_b/Adam_1 = Variable_class=["loc:@shared_model/conv_20_b"], container="", dtype=DT_FLOAT, shape=[1], shared_name="", _device="/device:GPU:0"]]
I do not know what's wrong with the code or my computer.My system is WIN 7 64 bit,Python 3.5.1,Tensorflow 0.12,CPU type.