Skip to content

Commit

Permalink
update eval.py
Browse files Browse the repository at this point in the history
  • Loading branch information
HMJiangGatech committed May 27, 2021
1 parent bcf4f4d commit 66753c9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def evaluate(args, model, tokenizer, labels, pad_token_label_id, best, mode, pre
eval_dataloader = DataLoader(eval_dataset, sampler=eval_sampler, batch_size=args.eval_batch_size)

# multi-gpu evaluate
if args.n_gpu > 1:
model = torch.nn.DataParallel(model)
#if args.n_gpu > 1:
# model = torch.nn.DataParallel(model)
#model.to(args.device)

logger.info("***** Running evaluation %s *****", prefix)
if verbose:
Expand Down

0 comments on commit 66753c9

Please sign in to comment.