We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77eeab1 commit f02c4bdCopy full SHA for f02c4bd
1 file changed
turftopic/late.py
@@ -63,6 +63,9 @@ def _encode_tokens(
63
):
64
batch = texts[start_index : start_index + batch_size]
65
features = self.tokenize(batch)
66
+ features = {
67
+ key: value.to(self.device) for key, value in features.items()
68
+ }
69
with torch.no_grad():
70
output_features = self.forward(features)
71
n_tokens = output_features["attention_mask"].sum(axis=1)
0 commit comments