首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我想重新培训启动-resnet-v2,但是GPU内核是不可否认的。

我想重新培训启动-resnet-v2,但是GPU内核是不可否认的。
EN

Stack Overflow用户
提问于 2018-09-17 10:20:10
回答 1查看 566关注 0票数 0

我想重新培训使用"train_image_classifier.py“python文件的启动-RESNET-v2.

  • 我的O/S是windows 10 64位
  • 我的GPU是geforce gtx 1060
  • 我使用Python3.6.5
  • 我使用Tensorflow 1.10.0
  • 我使用CUDA 9.0

如何打开GPU内核?请帮我再培训一下。

好的!这是密码

classifier.py

这是一个变数。

  • --train_dir='C:\Users\stat\Desktop\hgh\retrain‘
  • -数据集_name=mnist
  • -数据集_split_name=列车
  • -dataset_dir=“C:\Users\stat\Desktop\hgh\TFR”
  • -模型_name=inception_resnet_v2
  • -批号=50
  • -最大步数=3000
  • -检查点路径= "C:\Users\stat\Desktop\hgh\inception_resnet_v2_2016_08_30.ckpt
  • -检查点_exclude_scopes=InceptionResnetV2 2/Logits,InceptionResnetV2 2/AuxLogits
  • -可培训范围=InceptionResnetV2 2/Logits,InceptionResnetV2 2/AuxLogits

主要错误信息是

代码语言:javascript
复制
InvalidArgumentError (see above for traceback): Cannot assign a device for operation 'InceptionResnetV2/Logits/Predictions': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available.
Registered kernels:
  device='CPU'; T in [DT_HALF]
  device='CPU'; T in [DT_FLOAT]
  device='CPU'; T in [DT_DOUBLE]
  [[Node: InceptionResnetV2/Logits/Predictions = Softmax[T=DT_FLOAT, _device="/device:GPU:0"](InceptionResnetV2/Logits/Logits/BiasAdd)]]

你能帮我一下吗?

这是一条全错误消息!

代码语言:javascript
复制
C:\Anaconda3\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from "float" to "np.floating" is deprecated. In future, it will be treated as "np.float64 == np.dtype(float).type".
from ._conv import register_converters as _register_converters
WARNING:tensorflow:From train_image_classifier.py:407: create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version.
Instructions for updating:
Please switch to tf.train.create_global_step
WARNING:tensorflow:From train_image_classifier.py:473: softmax_cross_entropy 
(from tensorflow.contrib.losses.python.losses.loss_ops) is deprecated and will be removed after 2016-12-30.
Instructions for updating:
Use tf.losses.softmax_cross_entropy instead. Note that the order of the logits and labels arguments has been changed.
WARNING:tensorflow:From C:\Anaconda3\lib\site-packages\tensorflow\contrib\losses\python\losses\loss_ops.py:398: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.
See @{tf.nn.softmax_cross_entropy_with_logits_v2}.
WARNING:tensorflow:From C:\Anaconda3\lib\site-packages\tensorflow\contrib\losses\python\losses\loss_ops.py:399: compute_weighted_loss (from tensorflow.contrib.losses.python.losses.loss_ops) is deprecated and will be removed after 2016-12-30.
Instructions for updating:
Use tf.losses.compute_weighted_loss instead.
WARNING:tensorflow:From C:\Anaconda3\lib\site-packages\tensorflow\contrib\losses\python\losses\loss_ops.py:147: add_arg_scope.<locals>.func_with_args (from tensorflow.contrib.losses.python.losses.loss_ops) is deprecated and will be removed after 2016-12-30.
Instructions for updating:
Use tf.losses.add_loss instead.
INFO:tensorflow:Fine-tuning from C:\Users\stat\Desktop\hgh\inception_resnet_v2_2016_08_30.ckpt
WARNING:tensorflow:From C:\Anaconda3\lib\site-packages\tensorflow\contrib\slim\python\slim\learning.py:737: Supervisor.__init__ (from tensorflow.python.training.supervisor) is deprecated and will be removed in a future version.
Instructions for updating:
Please switch to tf.train.MonitoredTrainingSession
2018-09-17 15:37:12.622658: I T:\src\github\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2018-09-17 15:37:13.165705: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1405] Found device 0 with properties:
name: GeForce GTX 1060 6GB major: 6 minor: 1 memoryClockRate(GHz): 1.7085 pciBusID: 0000:08:00.0 totalMemory: 6.00GiB freeMemory: 4.96GiB
2018-09-17 15:37:13.176595: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1484] Adding visible gpu devices: 0
2018-09-17 15:37:15.911929: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:965] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-09-17 15:37:15.918852: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:971]      0
2018-09-17 15:37:15.923879: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:984] 0:   N
2018-09-17 15:37:15.931213: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1097] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 4722 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:08:00.0, compute capability: 6.1)
INFO:tensorflow:Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.InvalidArgumentError'>, Cannot assign a device for operation 'InceptionResnetV2/Logits/Predictions': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available.
Registered kernels:
  device='CPU'; T in [DT_HALF]
  device='CPU'; T in [DT_FLOAT]
  device='CPU'; T in [DT_DOUBLE]
  [[Node: InceptionResnetV2/Logits/Predictions = Softmax[T=DT_FLOAT, _device="/device:GPU:0"](InceptionResnetV2/Logits/Logits/BiasAdd)]]
Caused by op 'InceptionResnetV2/Logits/Predictions', defined at:
File "train_image_classifier.py", line 580, in <module>
    tf.app.run()
File "C:\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
File "train_image_classifier.py", line 481, in main
    clones = model_deploy.create_clones(deploy_config, clone_fn, [batch_queue])
File "C:\Users\stat\Desktop\hgh\models-master\research\slim\deployment\model_deploy.py", line 193, in create_clones
    outputs = model_fn(*args, **kwargs)
File "train_image_classifier.py", line 464, in clone_fn
    logits, end_points = network_fn(images)
File "C:\Users\stat\Desktop\hgh\models-master\research\slim\nets\nets_factory.py", line 147, in network_fn
    return func(images, num_classes, is_training=is_training, **kwargs)
File "C:\Users\stat\Desktop\hgh\models-master\research\slim\nets\inception_resnet_v2.py", line 363, in inception_resnet_v2
    end_points['Predictions'] = tf.nn.softmax(logits, name='Predictions')
File "C:\Anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py", line 454, in new_func
    return func(*args, **kwargs)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\ops\nn_ops.py", line 1738, in softmax
    return _softmax(logits, gen_nn_ops.softmax, axis, name)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\ops\nn_ops.py", line 1673, in _softmax
    return compute_op(logits, name=name)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_nn_ops.py", line 7672, in softmax
    "Softmax", logits=logits, name=name)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py", line 454, in new_func
    return func(*args, **kwargs)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3155, in create_op
    op_def=op_def)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1717, in __init__
    self._traceback = tf_stack.extract_stack()
InvalidArgumentError (see above for traceback): Cannot assign a device for operation 'InceptionResnetV2/Logits/Predictions': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available.
Registered kernels:
  device='CPU'; T in [DT_HALF]
  device='CPU'; T in [DT_FLOAT]
  device='CPU'; T in [DT_DOUBLE]
  [[Node: InceptionResnetV2/Logits/Predictions = Softmax[T=DT_FLOAT, _device="/device:GPU:0"](InceptionResnetV2/Logits/Logits/BiasAdd)]]
Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1278, in _do_call
    return fn(*args)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1261, in _run_fn
    self._extend_graph()
File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1295, in _extend_graph
    tf_session.ExtendSession(self._session)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation 'InceptionResnetV2/Logits/Predictions': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available.
Registered kernels:
  device='CPU'; T in [DT_HALF]
  device='CPU'; T in [DT_FLOAT]
  device='CPU'; T in [DT_DOUBLE]
  [[Node: InceptionResnetV2/Logits/Predictions = Softmax[T=DT_FLOAT, _device="/device:GPU:0"](InceptionResnetV2/Logits/Logits/BiasAdd)]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train_image_classifier.py", line 580, in <module>
    tf.app.run()
File "C:\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
File "train_image_classifier.py", line 576, in main
     sync_optimizer=optimizer if FLAGS.sync_replicas else None)
File "C:\Anaconda3\lib\site-packages\tensorflow\contrib\slim\python\slim\learning.py", line 748, in train
    master, start_standard_services=False, config=session_config) as sess:
File "C:\Anaconda3\lib\contextlib.py", line 81, in __enter__
     return next(self.gen)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\training\supervisor.py", line 1005, in managed_session
    self.stop(close_summary_writer=close_summary_writer)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\training\supervisor.py", line 833, in stop
    ignore_live_threads=ignore_live_threads)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\training\coordinator.py", line 389, in join
     six.reraise(*self._exc_info_to_raise)
File "C:\Anaconda3\lib\site-packages\six.py", line 693, in reraise
     raise value
File "C:\Anaconda3\lib\site-packages\tensorflow\python\training\supervisor.py", line 994, in managed_session
     start_standard_services=start_standard_services)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\training\supervisor.py", line 731, in prepare_or_wait_for_session
    init_feed_dict=self._init_feed_dict, init_fn=self._init_fn)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\training\session_manager.py", line 287, in prepare_session
     sess.run(init_op, feed_dict=init_feed_dict)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 877, in run
    run_metadata_ptr)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1100, in _run
    feed_dict_tensor, options, run_metadata)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1272, in _do_run
     run_metadata)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1291, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation 'InceptionResnetV2/Logits/Predictions': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available.
Registered kernels:
  device='CPU'; T in [DT_HALF]
  device='CPU'; T in [DT_FLOAT]
  device='CPU'; T in [DT_DOUBLE]
  [[Node: InceptionResnetV2/Logits/Predictions = Softmax[T=DT_FLOAT, _device="/device:GPU:0"](InceptionResnetV2/Logits/Logits/BiasAdd)]]
Caused by op 'InceptionResnetV2/Logits/Predictions', defined at:
File "train_image_classifier.py", line 580, in <module>
     tf.app.run()
File "C:\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
File "train_image_classifier.py", line 481, in main
    clones = model_deploy.create_clones(deploy_config, clone_fn, [batch_queue])
File "C:\Users\stat\Desktop\hgh\models-master\research\slim\deployment\model_deploy.py", line 193, in create_clones
     outputs = model_fn(*args, **kwargs)
File "train_image_classifier.py", line 464, in clone_fn 
     logits, end_points = network_fn(images)
File "C:\Users\stat\Desktop\hgh\models-master\research\slim\nets\nets_factory.py", line 147, in network_fn
    return func(images, num_classes, is_training=is_training, **kwargs)
File "C:\Users\stat\Desktop\hgh\models-master\research\slim\nets\inception_resnet_v2.py", line 363, in inception_resnet_v2
     end_points['Predictions'] = tf.nn.softmax(logits, name='Predictions')
File "C:\Anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py", line 454, in new_func
    return func(*args, **kwargs)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\ops\nn_ops.py", line 1738, in softmax
     return _softmax(logits, gen_nn_ops.softmax, axis, name)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\ops\nn_ops.py", line 1673, in _softmax
    return compute_op(logits, name=name)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_nn_ops.py", line 7672, in softmax
    "Softmax", logits=logits, name=name)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py", line 454, in new_func
    return func(*args, **kwargs)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3155, in create_op
     op_def=op_def)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1717, in __init__
     self._traceback = tf_stack.extract_stack()
InvalidArgumentError (see above for traceback): Cannot assign a device for operation 'InceptionResnetV2/Logits/Predictions': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available.
Registered kernels:
  device='CPU'; T in [DT_HALF]
  device='CPU'; T in [DT_FLOAT]
  device='CPU'; T in [DT_DOUBLE]
  [[Node: InceptionResnetV2/Logits/Predictions = Softmax[T=DT_FLOAT, _device="/device:GPU:0"](InceptionResnetV2/Logits/Logits/BiasAdd)]]
EN

回答 1

Stack Overflow用户

发布于 2018-09-18 09:03:02

我升级了我的tensorflow 1.11.0,这样这个错误就解决了!

谢谢

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52365526

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档