Skip to content

Commit

Permalink
Update DMI.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Peng Cao authored Sep 30, 2019
1 parent cc74eb8 commit 95d7d46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dogcat/DMI.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def train(train_loader, model, optimizer, criterion=CE):

for i, (idx, input, target) in enumerate(tqdm(train_loader)):
if idx.size(0) != batch_size:
break
continue

input = torch.autograd.Variable(input.cuda())
target = torch.autograd.Variable(target.cuda())
Expand Down Expand Up @@ -67,7 +67,7 @@ def validate(valid_loader, model, criterion):

for i, (idx, input, target) in enumerate(tqdm(valid_loader)):
if i == 1:
continue
break

input = torch.autograd.Variable(input.cuda())
target = torch.autograd.Variable(target.cuda())
Expand Down Expand Up @@ -109,4 +109,4 @@ def evaluate(path):

if __name__ == '__main__':
main_dmi()
evaluate('./dog_model_dmi_' + str(args.r) + '_' + str(args.s))
evaluate('./dog_model_dmi_' + str(args.r) + '_' + str(args.s))

0 comments on commit 95d7d46

Please sign in to comment.