Closed chewnglow closed 2 years ago
The code of sending data to device is data.to(device), while the model of that is model.cuda(). This may create device inconsistency when device is not set to the default device.
data.to(device)
model.cuda()
device
The code of sending data to device is
data.to(device)
, while the model of that ismodel.cuda()
. This may create device inconsistency whendevice
is not set to the default device.