question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RuntimeError: don't know how to restore data location of torch.FloatStorage

See original GitHub issue

I am trying to train Yolov5 using DML and after tweaks in the code to let it use the DML device, I have this error when it tries to load the weights on the GPU:

 File "D:\Documenti\models\GTA_code\dml\lib\site-packages\torch\serialization.py", line 592, in load
    return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
  File "D:\Documenti\models\GTA_code\dml\lib\site-packages\torch\serialization.py", line 851, in _load
    result = unpickler.load()
  File "D:\Documenti\models\GTA_code\dml\lib\site-packages\torch\serialization.py", line 843, in persistent_load
    load_tensor(data_type, size, key, _maybe_decode_ascii(location))
  File "D:\Documenti\models\GTA_code\dml\lib\site-packages\torch\serialization.py", line 832, in load_tensor
    loaded_storages[key] = restore_location(storage, location)
  File "D:\Documenti\models\GTA_code\dml\lib\site-packages\torch\serialization.py", line 812, in restore_location
    return default_restore_location(storage, str(map_location))
  File "D:\Documenti\models\GTA_code\dml\lib\site-packages\torch\serialization.py", line 178, in default_restore_location
    raise RuntimeError("don't know how to restore data location of "
RuntimeError: don't know how to restore data location of torch.FloatStorage (tagged with dml)

Loading pretrained weights is not a supported feature…?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
smk2007commented, May 18, 2022

Hi, and thanks for posting the issue.

We have not taken a look at yolov5 yet, and as such the operators needed to get yolov5 working end-to-end are spotty. We absolutely intend to support yolov5 in the future, and will update this thread when we expect to have the operator conformance needed to enable it.

0reactions
lyleaf-81commented, Sep 7, 2022

Hello, do you support YOLOV4?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Map_location not working with mps
Given a device = torch.device("mps"), I can't use functions that ... know how to restore data location of " RuntimeError: don't know how...
Read more >
【报错记录】RuntimeError: don't know how to restore data ...
问题描述. 在调试一个代码时,在输入参数都正确的情况下,报出 RuntimeError: don't know how to restore data location of torch.FloatStorage ...
Read more >
RuntimeError: Attempting to deserialize object on a CUDA ...
I just created README.md file for this project to run successfully, it's here: Install PyTorch via pip to run STM Paper.
Read more >
RuntimeError when exporting a model
learn.export('model.pkl'). I get following error: 'RuntimeError: don't know how to determine data location of torch.storage._UntypedStorage'.
Read more >
torch.serialization — PyTorch master documentation
... location) if result is not None: return result raise RuntimeError("don't know how to restore data location of " + torch.typename(storage) + "...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found