I got stuck due to this error. I try to resolve it in many ways but I can’t.
Please anyone help me to solve it effectively
link of code:- Google Colab
I got stuck due to this error. I try to resolve it in many ways but I can’t.
Please anyone help me to solve it effectively
link of code:- Google Colab
Most likely this error is thrown because esp
is still on the CPU while mu
and std
seem to be calculated by the linear layers and might thus be on the GPU (if the model was pushed to the GPU of course).
Try to create esp
using the device
argument of mu
:
esp = torch.randn(*mu.size(), device=mu.device)
Thank u for solution…it solve my error very easily…