mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-02 03:01:07 +06:00
Revert previous change - that was meant to be in a branch!
This commit is contained in:
parent
2085f20901
commit
1a354d53c4
@ -1064,7 +1064,7 @@ class TFModelTesterMixin:
|
|||||||
config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common()
|
config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common()
|
||||||
for model_class in self.all_model_classes:
|
for model_class in self.all_model_classes:
|
||||||
model = model_class(config)
|
model = model_class(config)
|
||||||
if getattr(model, "hf_compute_loss", None):
|
if getattr(model, "compute_loss", None):
|
||||||
# The number of elements in the loss should be the same as the number of elements in the label
|
# The number of elements in the loss should be the same as the number of elements in the label
|
||||||
prepared_for_class = self._prepare_for_class(inputs_dict.copy(), model_class, return_labels=True)
|
prepared_for_class = self._prepare_for_class(inputs_dict.copy(), model_class, return_labels=True)
|
||||||
added_label = prepared_for_class[
|
added_label = prepared_for_class[
|
||||||
|
Loading…
Reference in New Issue
Block a user