diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8a0a550 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +* +!*.py +!.gitignore \ No newline at end of file diff --git a/CIFAR10_playground.py b/CIFAR10_playground.py index 7df1dc8..404637e 100755 --- a/CIFAR10_playground.py +++ b/CIFAR10_playground.py @@ -223,7 +223,7 @@ class BnDeepNet(nn.Module): model = DeepNet('tanh') # model = BnDeepNet('relu') -device=torch.device("cuda") +device=torch.device("cuda" if torch.cuda.is_available() else "cpu") model.to(device) criterion = nn.CrossEntropyLoss()