[tests] further fix Tester object has no attribute '_testMethodName' (#35781)
* bug fix * update with more cases * more entries * Fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -30,7 +30,7 @@ if is_flax_available():
|
||||
from transformers.models.vit.modeling_flax_vit import FlaxViTForImageClassification, FlaxViTModel
|
||||
|
||||
|
||||
class FlaxViTModelTester(unittest.TestCase):
|
||||
class FlaxViTModelTester:
|
||||
def __init__(
|
||||
self,
|
||||
parent,
|
||||
@@ -72,7 +72,6 @@ class FlaxViTModelTester(unittest.TestCase):
|
||||
# in ViT, the seq length equals the number of patches + 1 (we add 1 for the [CLS] token)
|
||||
num_patches = (image_size // patch_size) ** 2
|
||||
self.seq_length = num_patches + 1
|
||||
super().__init__()
|
||||
|
||||
def prepare_config_and_inputs(self):
|
||||
pixel_values = floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size])
|
||||
|
||||
Reference in New Issue
Block a user