Tensor("fc8/BiasAdd:0", shape=(?, 10), dtype=float32, device=/device:GPU:0)
Tensor("batch_labels:0", shape=(?, 10), dtype=float32)
---------------------------------------------------------------------------
InvalidArgumentError Traceback (most recent call last)
/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/client/session.py in _do_call(self, fn, *args)
729 try:
--> 730 return fn(*args)
731 except errors.OpError as e:
/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/client/session.py in _run_fn(session, feed_dict, fetch_list, target_list, options, run_metadata)
711 feed_dict, fetch_list, target_list,
--> 712 status, run_metadata)
713
/home/kkari/DevTools/anaconda3/lib/python3.5/contextlib.py in __exit__(self, type, value, traceback)
65 try:
---> 66 next(self.gen)
67 except StopIteration:
/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/errors.py in raise_exception_on_not_ok_status()
449 compat.as_text(pywrap_tensorflow.TF_Message(status)),
--> 450 pywrap_tensorflow.TF_GetCode(status))
451 finally:
InvalidArgumentError: Cannot assign a device to node 'fc8/biases/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:
ApplyAdam: CPU
Const: CPU
Identity: CPU
Assign: CPU
Variable: CPU
[[Node: fc8/biases/Adam_1 = Variable[_class=["loc:@fc8/biases"], container="", dtype=DT_FLOAT, shape=[10], shared_name="", _device="/device:GPU:0"]()]]
During handling of the above exception, another exception occurred:
InvalidArgumentError Traceback (most recent call last)
<ipython-input-7-0f140f523f80> in <module>()
75 tf_batch_labels=batch_labels,
76 log_dir='cifar_conv_max_lrn_conv_lrn_max_flatten_fc_d_fc_d_sm_autoADAM_gpu',
---> 77 batch_size=32, num_steps=30000, test_steps=1000)
<ipython-input-4-2de30c81c763> in train_model(train_dataset, train_labels, test_dataset, test_labels, train_tensor, accuracy, tf_batch_data, tf_batch_labels, log_dir, num_steps, batch_size, test_steps, log_steps, predictor, last_test)
11 test_writer = tf.train.SummaryWriter(log_dir + '/test')
12
---> 13 session.run(tf.initialize_all_variables())
14
15 shuffle_train = np.random.permutation(train_dataset.shape[0])
/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/client/session.py in run(self, fetches, feed_dict, options, run_metadata)
380 try:
381 result = self._run(None, fetches, feed_dict, options_ptr,
--> 382 run_metadata_ptr)
383 if run_metadata:
384 proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)
/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/client/session.py in _run(self, handle, fetches, feed_dict, options, run_metadata)
653 movers = self._update_with_movers(feed_dict_string, feed_map)
654 results = self._do_run(handle, target_list, unique_fetches,
--> 655 feed_dict_string, options, run_metadata)
656
657 # User may have fetched the same tensor multiple times, but we
/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/client/session.py in _do_run(self, handle, target_list, fetch_list, feed_dict, options, run_metadata)
721 if handle is None:
722 return self._do_call(_run_fn, self._session, feed_dict, fetch_list,
--> 723 target_list, options, run_metadata)
724 else:
725 return self._do_call(_prun_fn, self._session, handle, feed_dict,
/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/client/session.py in _do_call(self, fn, *args)
741 except KeyError:
742 pass
--> 743 raise type(e)(node_def, op, message)
744
745 def _extend_graph(self):
InvalidArgumentError: Cannot assign a device to node 'fc8/biases/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:
ApplyAdam: CPU
Const: CPU
Identity: CPU
Assign: CPU
Variable: CPU
[[Node: fc8/biases/Adam_1 = Variable[_class=["loc:@fc8/biases"], container="", dtype=DT_FLOAT, shape=[10], shared_name="", _device="/device:GPU:0"]()]]
Caused by op 'fc8/biases/Adam_1', defined at:
File "/home/kkari/DevTools/anaconda3/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/ipykernel/__main__.py", line 3, in <module>
app.launch_new_instance()
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/traitlets/config/application.py", line 653, in launch_instance
app.start()
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/ipykernel/kernelapp.py", line 474, in start
ioloop.IOLoop.instance().start()
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/zmq/eventloop/ioloop.py", line 162, in start
super(ZMQIOLoop, self).start()
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tornado/ioloop.py", line 887, in start
handler_func(fd_obj, events)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tornado/stack_context.py", line 275, in null_wrapper
return fn(*args, **kwargs)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/zmq/eventloop/zmqstream.py", line 440, in _handle_events
self._handle_recv()
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/zmq/eventloop/zmqstream.py", line 472, in _handle_recv
self._run_callback(callback, msg)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/zmq/eventloop/zmqstream.py", line 414, in _run_callback
callback(*args, **kwargs)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tornado/stack_context.py", line 275, in null_wrapper
return fn(*args, **kwargs)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 276, in dispatcher
return self.dispatch_shell(stream, msg)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 228, in dispatch_shell
handler(stream, idents, msg)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 390, in execute_request
user_expressions, allow_stdin)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/ipykernel/ipkernel.py", line 196, in do_execute
res = shell.run_cell(code, store_history=store_history, silent=silent)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/ipykernel/zmqshell.py", line 501, in run_cell
return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 2717, in run_cell
interactivity=interactivity, compiler=compiler, result=result)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 2821, in run_ast_nodes
if self.run_code(code, result):
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 2881, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-7-0f140f523f80>", line 61, in <module>
train_tensor = slim.learning.create_train_op(total_loss, optimizer)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/slim/python/slim/learning.py", line 457, in create_train_op
grad_updates = optimizer.apply_gradients(grads, global_step=global_step)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/training/optimizer.py", line 300, in apply_gradients
self._create_slots(var_list)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/training/adam.py", line 119, in _create_slots
self._zeros_slot(v, "v", self._name)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/training/optimizer.py", line 494, in _zeros_slot
named_slots[var] = slot_creator.create_zeros_slot(var, op_name)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/training/slot_creator.py", line 108, in create_zeros_slot
colocate_with_primary=colocate_with_primary)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/training/slot_creator.py", line 86, in create_slot
return _create_slot_var(primary, val, scope)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/training/slot_creator.py", line 50, in _create_slot_var
slot = variables.Variable(val, name=scope, trainable=False)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variables.py", line 211, in __init__
dtype=dtype)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variables.py", line 296, in _init_from_args
name=name)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/state_ops.py", line 140, in variable_op
container=container, shared_name=shared_name)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/gen_state_ops.py", line 396, in _variable
name=name)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/op_def_library.py", line 703, in apply_op
op_def=op_def)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 2310, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/home/kkari/DevTools/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 1232, in __init__
self._traceback = _extract_stack()