Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from kudkudak/master
Browse files Browse the repository at this point in the history
Fix resuming
  • Loading branch information
ynd authored Aug 19, 2018
2 parents 8e26301 + 1fe8c5e commit 7af1916
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
# Load checkpoint.
print('==> Resuming from checkpoint..')
assert os.path.isdir('checkpoint'), 'Error: no checkpoint directory found!'
checkpoint = torch.load('./checkpoint/ckpt.t7' + args.name
checkpoint = torch.load('./checkpoint/ckpt.t7' + args.name + '_'
+ str(args.seed))
net = checkpoint['net']
best_acc = checkpoint['acc']
Expand Down Expand Up @@ -155,8 +155,6 @@ def train(epoch):
targets_a, targets_b))
outputs = net(inputs)
loss = mixup_criterion(criterion, outputs, targets_a, targets_b, lam)
train_loss += loss.data[0]

train_loss += loss.data[0]
_, predicted = torch.max(outputs.data, 1)
total += targets.size(0)
Expand Down

0 comments on commit 7af1916

Please sign in to comment.