【发布时间】:2022-04-06 22:19:47
【问题描述】:
linux_user@server_machine:~/spatial/tuning_neighbors_7$ python3 *hyper*.py
Traceback (most recent call last):
File "tuner_hyperband.py", line 209, in <module>
load_data_k(
File "tuner_hyperband.py", line 127, in load_data_k
tz = tf.convert_to_tensor(data_z, np.float32)
File "/home/linux_user/.local/lib/python3.8/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/home/linux_user/.local/lib/python3.8/site-packages/tensorflow/python/framework/constant_op.py", line 106, in convert_to_eager_tensor
return ops.EagerTensor(value, ctx.device_name, dtype)
tensorflow.python.framework.errors_impl.InternalError: Failed copying input tensor from /job:localhost/replica:0/task:0/device:CPU:0 to /job:localhost/replica:0/task:0/device:GPU:0 in order to run _EagerConst: Dst tensor is not initialized.
linux_user@server_machine:~/spatial/tuning_neighbors_7$
这个错误的主要原因是什么?
-
是因为磁盘空间不足吗?
-
是因为内存不足吗?
-
是因为使用了 GPU 吗?
如何解决?
【问题讨论】:
-
很可能是 GPU 内存不足。另见:TensorFlow: Dst tensor is not initialized
标签: python tensorflow keras gpu