Spaces:
Build error
Build error
remove useless detach call
Browse files- syntaxgym.py +0 -1
syntaxgym.py
CHANGED
|
@@ -238,7 +238,6 @@ class SyntaxGym(evaluate.EvaluationModule):
|
|
| 238 |
|
| 239 |
max_long = torch.iinfo(torch.int64).max
|
| 240 |
|
| 241 |
-
input_ids = input_ids.detach()
|
| 242 |
for i_cond, (i_tokens, i_offsets) in enumerate(zip(input_ids, offset_mapping)):
|
| 243 |
region_edges = self.get_region_edges(item, i_cond)
|
| 244 |
|
|
|
|
| 238 |
|
| 239 |
max_long = torch.iinfo(torch.int64).max
|
| 240 |
|
|
|
|
| 241 |
for i_cond, (i_tokens, i_offsets) in enumerate(zip(input_ids, offset_mapping)):
|
| 242 |
region_edges = self.get_region_edges(item, i_cond)
|
| 243 |
|