mikael-alafriz-deel / lucid-sonic-dreams

MIT License
771 stars 157 forks source link

Cannot assign a device for operation #29

Open skit4214 opened 3 years ago

skit4214 commented 3 years ago

Hi Try to run simple code from example but get exception instantly after start 'Hallucinating...' process. Tensorflow can't find GPU? Notebook with UHD Graphics 630 and GeForce RTX 2060 Cuda 11.3 Tensorflow 1.15.0 Windows 10

Console:

Hallucinating...

0%| | 0/2600 [00:00<?, ?it/s] Traceback (most recent call last): File "C:\Users\1\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 1365, in _do_call return fn(*args) File "C:\Users\1\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 1350, in _run_fn target_list, run_metadata) File "C:\Users\1\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 1443, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation G_mapping_1/_Run/G_mapping/latents_in: {{node G_mapping_1/_Run/G_mapping/latents_in}} 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. [[G_mapping_1/_Run/G_mapping/latents_in]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "test1.py", line 6, in L.hallucinate(file_name = 'C:\Proj\Self\NeuralNetworks\Ojo de Dios.mp4') File "C:\Users\1\AppData\Local\Programs\Python\Python37\lib\site-packages\lucidsonicdreams\main.py", line 680, in hallucinate self.generate_frames() File "C:\Users\1\AppData\Local\Programs\Python\Python37\lib\site-packages\lucidsonicdreams\main.py", line 525, in generate_frames np.tile(class_batch, (batch_size, 1))) File "C:\Users\1\AppData\Local\Programs\Python\Python37\lib\site-packages\dnnlib\tflib\network.py", line 443, in run mb_out = tf.get_default_session().run(out_expr, dict(zip(in_expr, mb_in))) File "C:\Users\1\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 956, in run run_metadata_ptr) File "C:\Users\1\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 1180, in _run feed_dict_tensor, options, run_metadata) File "C:\Users\1\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 1359, in _do_run run_metadata) File "C:\Users\1\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 1384, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation G_mapping_1/_Run/G_mapping/latents_in: node G_mapping_1/_Run/G_mapping/latents_in (defined at C:\Users\1\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\framework\ops.py:1748) 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. [[G_mapping_1/_Run/G_mapping/latents_in]]

jinnosux commented 3 years ago

I think you should install CUDA 10.0 version instead.

source : https://www.tensorflow.org/install/source#gpu

xxristoskk commented 2 years ago

Unfortunately, I am running into the same issue and have CUDA 10.0 installed.

wangzi815 commented 11 months ago

I have the same issue and have CUDA 11.4. Tensorflow 1.15.4,rtx3080,ubuntu.