{"action":"closed","issue":{"url":"https://api.github.com/repos/hzy46/Deep-Learning-21-Examples/issues/23","repository_url":"https://api.github.com/repos/hzy46/Deep-Learning-21-Examples","labels_url":"https://api.github.com/repos/hzy46/Deep-Learning-21-Examples/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/hzy46/Deep-Learning-21-Examples/issues/23/comments","events_url":"https://api.github.com/repos/hzy46/Deep-Learning-21-Examples/issues/23/events","html_url":"https://github.com/hzy46/Deep-Learning-21-Examples/issues/23","id":328171880,"node_id":"MDU6SXNzdWUzMjgxNzE4ODA=","number":23,"title":"第3章 3.3.4的训练一定要GPU参与吗？","user":{"login":"chencharry","id":35133996,"node_id":"MDQ6VXNlcjM1MTMzOTk2","avatar_url":"https://avatars1.githubusercontent.com/u/35133996?v=4","gravatar_id":"","url":"https://api.github.com/users/chencharry","html_url":"https://github.com/chencharry","followers_url":"https://api.github.com/users/chencharry/followers","following_url":"https://api.github.com/users/chencharry/following{/other_user}","gists_url":"https://api.github.com/users/chencharry/gists{/gist_id}","starred_url":"https://api.github.com/users/chencharry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chencharry/subscriptions","organizations_url":"https://api.github.com/users/chencharry/orgs","repos_url":"https://api.github.com/users/chencharry/repos","events_url":"https://api.github.com/users/chencharry/events{/privacy}","received_events_url":"https://api.github.com/users/chencharry/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-05-31T14:51:50Z","updated_at":"2018-06-16T03:44:11Z","closed_at":"2018-06-16T03:44:11Z","author_association":"NONE","body":"chapter_3/slim# python train_image_classifier.py   --train_dir=satellite/train_dir   --dataset_name=satellite   --dataset_split_name=train   --dataset_dir=satellite/data   --model_name=inception_v3   --checkpoint_path=satellite/pretrained/inception_v3.ckpt   --checkpoint_exclude_scopes=InceptionV3/Logits,InceptionV3/AuxLogits   --trainable_scopes=InceptionV3/Logits,InceptionV3/AuxLogits   --max_number_of_steps=100000   --batch_size=32   --learning_rate=0.001   --learning_rate_decay_type=fixed   --save_interval_secs=300   --save_summaries_secs=2   --log_every_n_steps=10   --optimizer=rmsprop   --weight_decay=0.00004\r\nWARNING:tensorflow:From train_image_classifier.py:398: create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version.\r\nInstructions for updating:\r\nPlease switch to tf.train.create_global_step\r\nINFO:tensorflow:Summary name /clone_loss is illegal; using clone_loss instead.\r\nINFO:tensorflow:Fine-tuning from satellite/pretrained/inception_v3.ckpt\r\n2018-05-31 22:46:18.586097: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 AVX512F FMA\r\nINFO:tensorflow:Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.InvalidArgumentError'>, Cannot assign a device for operation 'InceptionV3/AuxLogits/Conv2d_2b_1x1/biases/RMSProp_1': Operation was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device.\r\n         [[Node: InceptionV3/AuxLogits/Conv2d_2b_1x1/biases/RMSProp_1 = VariableV2[_class=[\"loc:@InceptionV3/AuxLogits/Conv2d_2b_1x1/biases\"], container=\"\", dtype=DT_FLOAT, shape=[6], shared_name=\"\", _device=\"/device:GPU:0\"]()]]\r\n\r\nCaused by op u'InceptionV3/AuxLogits/Conv2d_2b_1x1/biases/RMSProp_1', defined at:\r\n  File \"train_image_classifier.py\", line 573, in <module>\r\n    tf.app.run()\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py\", line 48, in run\r\n    _sys.exit(main(_sys.argv[:1] + flags_passthrough))\r\n  File \"train_image_classifier.py\", line 540, in main\r\n    global_step=global_step)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/optimizer.py\", line 474, in apply_gradients\r\n    self._create_slots([_get_variable_for(v) for v in var_list])\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/rmsprop.py\", line 111, in _create_slots\r\n    self._zeros_slot(v, \"momentum\", self._name)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/optimizer.py\", line 796, in _zeros_slot\r\n    named_slots[_var_key(var)] = slot_creator.create_zeros_slot(var, op_name)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py\", line 174, in create_zeros_slot\r\n    colocate_with_primary=colocate_with_primary)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py\", line 148, in create_slot_with_initializer\r\n    dtype)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py\", line 67, in _create_slot_var\r\n    validate_shape=validate_shape)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 1203, in get_variable\r\n    constraint=constraint)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 1092, in get_variable\r\n    constraint=constraint)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 425, in get_variable\r\n    constraint=constraint)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 394, in _true_getter\r\n    use_resource=use_resource, constraint=constraint)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 805, in _get_single_variable\r\n    constraint=constraint)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py\", line 213, in __init__\r\n    constraint=constraint)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py\", line 309, in _init_from_args\r\n    name=name)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/state_ops.py\", line 133, in variable_op_v2\r\n    shared_name=shared_name)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_state_ops.py\", line 927, in _variable_v2\r\n    shared_name=shared_name, name=name)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py\", line 787, in _apply_op_helper\r\n    op_def=op_def)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py\", line 2956, in create_op\r\n    op_def=op_def)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py\", line 1470, in __init__\r\n    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access\r\n\r\nInvalidArgumentError (see above for traceback): Cannot assign a device for operation 'InceptionV3/AuxLogits/Conv2d_2b_1x1/biases/RMSProp_1': Operation was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device.\r\n         [[Node: InceptionV3/AuxLogits/Conv2d_2b_1x1/biases/RMSProp_1 = VariableV2[_class=[\"loc:@InceptionV3/AuxLogits/Conv2d_2b_1x1/biases\"], container=\"\", dtype=DT_FLOAT, shape=[6], shared_name=\"\", _device=\"/device:GPU:0\"]()]]\r\n\r\nTraceback (most recent call last):\r\n  File \"train_image_classifier.py\", line 573, in <module>\r\n    tf.app.run()\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py\", line 48, in run\r\n    _sys.exit(main(_sys.argv[:1] + flags_passthrough))\r\n  File \"train_image_classifier.py\", line 569, in main\r\n    sync_optimizer=optimizer if FLAGS.sync_replicas else None)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/slim/python/slim/learning.py\", line 742, in train\r\n    master, start_standard_services=False, config=session_config) as sess:\r\n  File \"/usr/lib/python2.7/contextlib.py\", line 17, in __enter__\r\n    return self.gen.next()\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/supervisor.py\", line 964, in managed_session\r\n    self.stop(close_summary_writer=close_summary_writer)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/supervisor.py\", line 792, in stop\r\n    stop_grace_period_secs=self._stop_grace_secs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/coordinator.py\", line 389, in join\r\n    six.reraise(*self._exc_info_to_raise)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/supervisor.py\", line 953, in managed_session\r\n    start_standard_services=start_standard_services)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/supervisor.py\", line 708, in prepare_or_wait_for_session\r\n    init_feed_dict=self._init_feed_dict, init_fn=self._init_fn)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/session_manager.py\", line 279, in prepare_session\r\n    sess.run(init_op, feed_dict=init_feed_dict)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py\", line 889, in run\r\n    run_metadata_ptr)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py\", line 1120, in _run\r\n    feed_dict_tensor, options, run_metadata)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py\", line 1317, in _do_run\r\n    options, run_metadata)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py\", line 1336, in _do_call\r\n    raise type(e)(node_def, op, message)\r\ntensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation 'InceptionV3/AuxLogits/Conv2d_2b_1x1/biases/RMSProp_1': Operation was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device.\r\n         [[Node: InceptionV3/AuxLogits/Conv2d_2b_1x1/biases/RMSProp_1 = VariableV2[_class=[\"loc:@InceptionV3/AuxLogits/Conv2d_2b_1x1/biases\"], container=\"\", dtype=DT_FLOAT, shape=[6], shared_name=\"\", _device=\"/device:GPU:0\"]()]]\r\n\r\nCaused by op u'InceptionV3/AuxLogits/Conv2d_2b_1x1/biases/RMSProp_1', defined at:\r\n  File \"train_image_classifier.py\", line 573, in <module>\r\n    tf.app.run()\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py\", line 48, in run\r\n    _sys.exit(main(_sys.argv[:1] + flags_passthrough))\r\n  File \"train_image_classifier.py\", line 540, in main\r\n    global_step=global_step)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/optimizer.py\", line 474, in apply_gradients\r\n    self._create_slots([_get_variable_for(v) for v in var_list])\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/rmsprop.py\", line 111, in _create_slots\r\n    self._zeros_slot(v, \"momentum\", self._name)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/optimizer.py\", line 796, in _zeros_slot\r\n    named_slots[_var_key(var)] = slot_creator.create_zeros_slot(var, op_name)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py\", line 174, in create_zeros_slot\r\n    colocate_with_primary=colocate_with_primary)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py\", line 148, in create_slot_with_initializer\r\n    dtype)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py\", line 67, in _create_slot_var\r\n    validate_shape=validate_shape)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 1203, in get_variable\r\n    constraint=constraint)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 1092, in get_variable\r\n    constraint=constraint)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 425, in get_variable\r\n    constraint=constraint)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 394, in _true_getter\r\n    use_resource=use_resource, constraint=constraint)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 805, in _get_single_variable\r\n    constraint=constraint)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py\", line 213, in __init__\r\n    constraint=constraint)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py\", line 309, in _init_from_args\r\n    name=name)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/state_ops.py\", line 133, in variable_op_v2\r\n    shared_name=shared_name)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_state_ops.py\", line 927, in _variable_v2\r\n    shared_name=shared_name, name=name)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py\", line 787, in _apply_op_helper\r\n    op_def=op_def)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py\", line 2956, in create_op\r\n    op_def=op_def)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py\", line 1470, in __init__\r\n    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access\r\n\r\nInvalidArgumentError (see above for traceback): Cannot assign a device for operation 'InceptionV3/AuxLogits/Conv2d_2b_1x1/biases/RMSProp_1': Operation was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device.\r\n         [[Node: InceptionV3/AuxLogits/Conv2d_2b_1x1/biases/RMSProp_1 = VariableV2[_class=[\"loc:@InceptionV3/AuxLogits/Conv2d_2b_1x1/biases\"], container=\"\", dtype=DT_FLOAT, shape=[6], shared_name=\"\", _device=\"/device:GPU:0\"]()]]\r\n"}}
{"actor":{"display_login":"chencharry"}}