I have a model (nn.module) class and inside this class i create a random tensor using torch.randn(). When I create a model.to(device) where device is cuda, the random tensor doesn’t get moved to cuda. Is the behavior correct? how should i do it, without passing device to the model.
Thanks