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

device mismatch issue in densenet #93

Open
Sarvesh-Kesharwani opened this issue Sep 2, 2023 · 2 comments
Open

device mismatch issue in densenet #93

Sarvesh-Kesharwani opened this issue Sep 2, 2023 · 2 comments

Comments

@Sarvesh-Kesharwani
Copy link
Contributor

Sarvesh-Kesharwani commented Sep 2, 2023

These errors are coming on master branch state of the densenet and
after setting batchnorm(training=False), both cases.

@Sarvesh-Kesharwani
Copy link
Contributor Author

Sarvesh-Kesharwani commented Sep 2, 2023

======================================================== ERRORS ========================================================
_____________________________ ERROR collecting ivy_models_tests/densenet/test_densenet.py ______________________________
ivy_models_tests/densenet/test_densenet.py:28: in
model = VARIANTSmodel_var
ivy_models/densenet/densenet.py:180: in densenet161
w_clean = load_torch_weights(
ivy_models/helpers/weights_helpers.py:144: in load_torch_weights
weights = torch.hub.load_state_dict_from_url(url, map_location=map_location)
/home/vscode/.local/lib/python3.8/site-packages/torch/hub.py:750: in load_state_dict_from_url
return torch.load(cached_file, map_location=map_location)
/home/vscode/.local/lib/python3.8/site-packages/torch/serialization.py:815: in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
/home/vscode/.local/lib/python3.8/site-packages/torch/serialization.py:1043: in _legacy_load
result = unpickler.load()
/home/vscode/.local/lib/python3.8/site-packages/torch/tensor.py:410: in setstate
self.set
(*state)
E RuntimeError: Attempted to set the storage of a tensor on device "cuda:0" to a storage on different device "cpu". This is no longer allowed; the devices must match.
=============================================== short test summary info ================================================
ERROR ivy_models_tests/densenet/test_densenet.py - RuntimeError: Attempted to set the storage of a tensor on device "cuda:0" to a storage on different device "cpu". ...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================== 1 error in 10.26s

image

@Sarvesh-Kesharwani Sarvesh-Kesharwani changed the title device mismatch error in densenet device mismatch issue in densenet Sep 2, 2023
@Sarvesh-Kesharwani
Copy link
Contributor Author

one more error on another run of tests
image

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

1 participant