You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there,
currently when trying to execute test.py without having a GPU or Cuda installed it throws the following error (even when setting --gpu_ids to -1):
Traceback (most recent call last):
File "test.py", line 61, in <module>
generated = model.inference(data['label'], data['inst'])
File "/Users/wottpal/Developer/melanoma-classification/pix2pixHD/models/pix2pixHD_model.py", line 197, in inference
input_label, inst_map, _, _ = self.encode_input(Variable(label), Variable(inst), infer=True)
File "/Users/wottpal/Developer/melanoma-classification/pix2pixHD/models/pix2pixHD_model.py", line 115, in encode_input
input_label = label_map.data.cuda()
RuntimeError: Cannot initialize CUDA without ATen_cuda library. PyTorch splits its backend into two shared libraries: a CPU library and a CUDA library; this error has occurred because you are trying to use some CUDA functionality, but the CUDA library has not been loaded by the dynamic linker for some reason. The CUDA library MUST be loaded, EVEN IF you don't directly use any symbols from the CUDA library! One common culprit is a lack of -Wl,--no-as-needed in your link arguments; many dynamic linkers will delete dynamic library dependencies if you don't depend on any of their symbols. You can check if this has occurred by using ldd on your binary to see if there is a dependency on *_cuda.so library.
A quick fix could be replacing line 115 in models/pix2pixHD_model.py with something like:
if not self.gpu_ids:
input_label = label_map.data
else:
input_label = label_map.data.cuda()
Regards from Germany,
Dennis
The text was updated successfully, but these errors were encountered:
In the current version there are several lines on the file pix2pixHD_model.py that need to be modified, all of them have the .cuda() and all of them can be replace by an if statement like above.
Hey there,
currently when trying to execute
test.py
without having a GPU or Cuda installed it throws the following error (even when setting--gpu_ids
to-1
):A quick fix could be replacing line
115
inmodels/pix2pixHD_model.py
with something like:Regards from Germany,
Dennis
The text was updated successfully, but these errors were encountered: