Coder Social home page Coder Social logo

ktdn's Issues

RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False.

Hi, when running your test program, i met this question? I cannot handle it. Can you help me? Thank you!

Traceback (most recent call last):
File "test.py", line 28, in
net = Dehaze()
File "C:\Users\zyq\Desktop\ktdn\model.py", line 255, in init
res2net101.load_state_dict(model_zoo.load_url(model_urls['res2net101_v1b_26w_4s']))
File "D:\anaconda\envs\dehaze\lib\site-packages\torch\hub.py", line 559, in load_state_dict_from_url
return torch.load(cached_file, map_location=map_location)
File "D:\anaconda\envs\dehaze\lib\site-packages\torch\serialization.py", line 595, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "D:\anaconda\envs\dehaze\lib\site-packages\torch\serialization.py", line 774, in _legacy_load
result = unpickler.load()
File "D:\anaconda\envs\dehaze\lib\site-packages\torch\serialization.py", line 730, in persistent_load
deserialized_objects[root_key] = restore_location(obj, location)
File "D:\anaconda\envs\dehaze\lib\site-packages\torch\serialization.py", line 175, in default_restore_location
result = fn(storage, location)
File "D:\anaconda\envs\dehaze\lib\site-packages\torch\serialization.py", line 151, in _cuda_deserialize
device = validate_cuda_device(location)
File "D:\anaconda\envs\dehaze\lib\site-packages\torch\serialization.py", line 135, in validate_cuda_device
raise RuntimeError('Attempting to deserialize object on a CUDA '
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the C
PU.

train.py

Thank you for your great work. I don't know if it's convenient for you to provide the code of your training process?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.