fix map_predictions
@@ -424,7 +424,7 @@ class PaddingUtils(object):
using valid_inds.
report_freq -- how often we report predictions
"""
- predictions = predictions.cpu()
+ predictions = predictions.cpu().data
for i in range(len(predictions)):
# map the predictions back to non-empty examples in the batch
# we join with spaces since we produce tokens one at a timelab
