Skip to content
This repository was archived by the owner on Jan 8, 2021. It is now read-only.

Commit 2af319b

Browse files
committed
Print CUDA state
1 parent b9bccde commit 2af319b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Test.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def test(data, network):
2424
network = torch.load(model_name)
2525
if not args.disable_cuda and torch.cuda.is_available():
2626
args.device = torch.device('cuda')
27+
print("Using CUDA...")
2728
network.cuda()
2829
else:
2930
args.device = torch.device('cpu')

Train.py

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def train(EPOCH, dataloader, test_dataloader, optimizer, loss_function, network,
129129
network = conv_network.autoencoder(orgsize, bottleneck)
130130
if not args.disable_cuda and torch.cuda.is_available():
131131
args.device = torch.device('cuda')
132+
print("Using CUDA...")
132133
network.cuda()
133134
else:
134135
args.device = torch.device('cpu')

0 commit comments

Comments
 (0)