我正在尝试在装有NVIDIA GeForce GTX 1650的笔记本电脑上运行Style GAN,并且正在遵循tutorial。我能够生成.tfrecord文件。之后,我尝试运行python train.py
,但出现以下错误:
Building TensorFlow graph...
.... some warnings here
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation G_synthesis_2/lod: {{node G_synthesis_2/lod}} was explicitly assigned to /device:GPU:1 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0, /job:localhost/replica:0/task:0/device:GPU:0 ]. Make sure the device specification refers to a valid device.
.... stack of the errors
During handling of the above exception, another exception occurred:
.... stack of the errors
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation G_synthesis_2/lod: node G_synthesis_2/lod (defined at C:\Users\Acer\anaconda3\envs\tf\lib\site-packages\tensorflow_core\python\framework\ops.py:1748) was explicitly assigned to /device:GPU:1 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0, /job:localhost/replica:0/task:0/device:GPU:0 ]. Make sure the device specification refers to a valid device.
[[G_synthesis_2/lod]]
tensorflow-gpu==1.15
CUDA_VISIBLE_DEVICES
更改为0
和0,1
有人可以帮忙吗?