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

EmpedSeg: requested version for torch and torchvision not found, with different versions type error while training #306

Open
pwetterauer opened this issue Jan 17, 2024 · 2 comments
Assignees
Labels
bug Something isn't working dependencies Pull requests that update a dependency file

Comments

@pwetterauer
Copy link

In section 1.1. Install key dependencies the requested versions for torch (1.5.1) and torchvision (0.6.1) are not found, so I installed the packages without version requirement (ended up with torch 2.1.2 and torchvision 0.16.2).
In section 4.2. Start Training I got following error:
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
I guess it might be related to the different torch version...
Everything else was running as expected (skipped sections 3.2 and 3.3).

@esgomezm
Copy link
Collaborator

Thanks for the issue. It let me seeing that the requirements in the notebook are outdated. The checked ones are here: https://github.com/HenriquesLab/ZeroCostDL4Mic/blob/master/requirements_files/EmbedSeg_2D_requirements_simple.txt

Still, with torch 2.1.2 and torchvision 0.16.2, it should work. Where are you running the notebook? If it is in Colab, could you please check if a GPU is available in your session?

@esgomezm esgomezm self-assigned this Jan 17, 2024
@esgomezm esgomezm added bug Something isn't working dependencies Pull requests that update a dependency file labels Jan 17, 2024
@pwetterauer
Copy link
Author

I ran the notebook in Colab and a GPU was available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants