Skip to content

Commit

Permalink
Fix unit tests (#2844)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaegukhyun authored Jan 29, 2024
1 parent f54eb1d commit 35d202e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unit/algo/visual_prompting/backbones/test_tiny_vit.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


class TestConv2d_BN: # noqa: N801
def setup(self) -> None:
def setup_method(self) -> None:
self.conv2d_bn = Conv2d_BN(a=1, b=1)

def test_init(self) -> None:
Expand Down Expand Up @@ -107,7 +107,7 @@ def test_forward(self) -> None:


class TestTinyViTBlock:
def setup(self) -> None:
def setup_method(self) -> None:
self.dim = 4
self.input_resolution = (6, 6)
self.num_heads = 1
Expand All @@ -131,7 +131,7 @@ def test_forward(self) -> None:


class TestBasicLayer:
def setup(self) -> None:
def setup_method(self) -> None:
self.dim = 4
self.input_resolution = (6, 6)
self.depth = 1
Expand Down Expand Up @@ -160,7 +160,7 @@ def test_extra_repr(self) -> None:


class TestTinyViT:
def setup(self) -> None:
def setup_method(self) -> None:
self.tiny_vit = TinyViT(
img_size=1024,
embed_dims=[64, 128, 160, 320],
Expand Down

0 comments on commit 35d202e

Please sign in to comment.