Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- model.eval()
- targets = []
- preds = []
- indices = np.arange(len(test_dataset))
- for i in tqdm(range(0, len(test_dataset), batch_size)):
- fields, target = acc_batch(test_dataset, i, batch_size, indices)
- fields, target = fields.to(device), target.to(device)
- y = model(fields).cpu().data.numpy()
- for _y in y:
- preds.append(_y)
- t = target.cpu().data.numpy()
- for _t in t:
- targets.append(_t)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement