Apply ruff flake8-comprehensions (#21694)
This commit is contained in:
@@ -362,9 +362,7 @@ class TFSegformerModelTest(TFModelTesterMixin, unittest.TestCase):
|
||||
_, prepared_for_class = self.model_tester.prepare_config_and_inputs_for_keras_fit(
|
||||
for_segmentation=for_segmentation
|
||||
)
|
||||
added_label = prepared_for_class[
|
||||
sorted(list(prepared_for_class.keys() - inputs_dict.keys()), reverse=True)[0]
|
||||
]
|
||||
added_label = prepared_for_class[sorted(prepared_for_class.keys() - inputs_dict.keys(), reverse=True)[0]]
|
||||
loss_size = tf.size(added_label)
|
||||
|
||||
# Test that model correctly compute the loss with kwargs
|
||||
|
||||
Reference in New Issue
Block a user