Skip to content

Commit

Permalink
Fixed the most embarrassingly obvious bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocketknight1 committed Aug 30, 2021
1 parent 582a95c commit 4b9cfb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/transformers/data/data_collator.py
Expand Up @@ -36,11 +36,11 @@ def __call__(self, features, return_tensors=None):
if return_tensors is None:
return_tensors = self.return_tensors
if return_tensors == "tf":
return tf_default_data_collator(features)
return self.tf_call(features)
elif return_tensors == "pt":
return torch_default_data_collator(features)
return self.torch_call(features)
elif return_tensors == "np":
return numpy_default_data_collator(features)
return self.numpy_call(features)
else:
raise ValueError(f"Framework '{return_tensors}' not recognized!")

Expand Down

0 comments on commit 4b9cfb5

Please sign in to comment.