Skip to content

Commit

Permalink
Fix prediction on CPU in DocReader.
Browse files Browse the repository at this point in the history
  • Loading branch information
ousou committed Mar 12, 2019
1 parent d27180f commit 1121aa3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drqa/reader/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,7 @@ def predict(self, ex, candidates=None, top_n=1, async_pool=None):
inputs = [e if e is None else e.cuda(non_blocking=True)
for e in ex[:5]]
else:
inputs = [e if e is None else e.cuda(non_blocking=True)
for e in ex[:5]]
inputs = [e for e in ex[:5]]

# Run forward
with torch.no_grad():
Expand Down

0 comments on commit 1121aa3

Please sign in to comment.