使用TensorFlow 2.0.0时:错误:设置XLA_GPU_JIT设备编号0时XLA服务不支持设备CUDA:0

我正在尝试在Tesla V100-SXM2 GPU上运行CuDNNLSTM层,但是由于安装了TensorFlow-gpu 2.0.0(由于是共享服务器而无法降级),因此会出现错误。

ConfigProto选项在tf 2.0.0时已弃用,因此以前的线程(例如this)无济于事。

os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = "2"  # Or 2,3,etc. other than 0

tf.config.gpu.set_per_process_memory_growth(True)
tf.config.set_soft_device_placement(True)

如果我使用此代码行,则会显示另一个错误:

  

module notfoundError:没有名为'tensorflow.contrib'的模块

q345268962 回答:使用TensorFlow 2.0.0时:错误:设置XLA_GPU_JIT设备编号0时XLA服务不支持设备CUDA:0

这是第一个GPU的内存已经由另一个工作人员分配。我仅通过使用以下代码即可选择另一个免费的GPU。输入='gpu:3'

driver.find_element_by_id("_58_login").send_keys("name")
driver.find_element_by_id("_58_password").send_keys("pw")
driver.find_element_by_css_selector('#main-content #sign-in-button').click()
本文链接:https://www.f2er.com/3153202.html

大家都在问