my codes are as follows:
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
model = torchvision.models.resnet34(pretrained=True).to(device)

and the call of to(..) method causes the problem, will it be much more clear?