I solve the problem ! :)) .  I add
device = torch.device(‘cuda’ if torch.cuda.is_available() else ‘cpu’)
print(device)
print(f"running with device: {torch.cuda.get_device_name(torch.cuda.current_device())}"
and change model.cuda() to model.to(device). I think the problem was wrong gpu selection.