You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I downloaded the 03. distinguishing_particles_in_brightfield_tutorial.ipynb from the tutorial and ran it locally. However, I encountered the following error when executing the code:
My pytorch version is 2.2.1 and python version is 3.11.5.
Is my modification to use dl.Regressor instead of dl.Model correct? If yes, how can I handle the RuntimeError related to channel mismatch in the following code?
In the deeplay tutorial, it's mentioned that the .fit() method handles training, validation, and logging, and also selects the best device (GPU if available). However, it seems to always train on the CPU. How can I force the training loop to run on the GPU?
Thanks in advance for your help!
The text was updated successfully, but these errors were encountered:
I got the error: RuntimeError: expected scalar type Long but found Float .
The error seems to originate from: return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing) located in lighting\pytorch\trainer\trainer.py.
Could you help clarify how to resolve this issue? Is it related to the data type of the labels or inputs in the train_loader? Or is it a compatibility issue with the Lightning package? My lightning package version is 2.5.0.post0.
I downloaded the
03. distinguishing_particles_in_brightfield_tutorial.ipynb
from the tutorial and ran it locally. However, I encountered the following error when executing the code:To resolve this, I modified the code to use dl.Regressor instead of dl.Model:
This works, but then I encounter another error when executing the following code:
My pytorch version is 2.2.1 and python version is 3.11.5.
dl.Regressor
instead ofdl.Model correct
? If yes, how can I handle the RuntimeError related to channel mismatch in the following code?Thanks in advance for your help!
The text was updated successfully, but these errors were encountered: