[BUG] (DataLoader
) sanity check fails due to Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor)
#20456
Labels
Bug description
Hi there! I have previously created my first
LightningDataModule
. More specifically, aNonGeoDataModule
which inherits from there (see torchgeo-fork. Interestingly, when I try to run this module I getRuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor
. Even more intersting is the fact, that if I override thetransfer_batch_to_device
like:I get the output
It happens during the validation step (lightning/pytorch/strategies/strategy.py", line 411).
What version are you seeing the problem on?
v2.4
How to reproduce the bug
Error messages and logs
Environment
Current environment
More info
No response
The text was updated successfully, but these errors were encountered: