Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot assign a device for operation #29

Open
skit4214 opened this issue May 14, 2021 · 3 comments
Open

Cannot assign a device for operation #29

skit4214 opened this issue May 14, 2021 · 3 comments

Comments

@skit4214
Copy link

skit4214 commented May 14, 2021

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
Copy link

I think you should install CUDA 10.0 version instead.

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

@xxristoskk
Copy link

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

@wangzi815
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants