HenriquesLab / ZeroCostDL4Mic

ZeroCostDL4Mic: A Google Colab based no-cost toolbox to explore Deep-Learning in Microscopy
MIT License
553 stars 129 forks source link

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

Open pwetterauer opened 7 months ago

pwetterauer commented 7 months ago

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 commented 7 months ago

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?

pwetterauer commented 7 months ago

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