Skip to content

Commit 05de477

Browse files
authored
Merge pull request layumi#63 from zhangchuangnankai/master
Update train.py
2 parents 4cb49ae + 42cf057 commit 05de477

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def save_network(network, epoch_label):
263263
save_filename = 'net_%s.pth'% epoch_label
264264
save_path = os.path.join('./model',name,save_filename)
265265
torch.save(network.cpu().state_dict(), save_path)
266-
if torch.cuda.is_available:
266+
if torch.cuda.is_available():
267267
network.cuda(gpu_ids[0])
268268

269269

0 commit comments

Comments
 (0)