Skip to content

Commit 83fc0a4

Browse files
committed
autofix
Signed-off-by: R. Garcia-Dias <[email protected]>
1 parent c9b41af commit 83fc0a4

File tree

3 files changed

+11
-19
lines changed

3 files changed

+11
-19
lines changed

tests/networks/blocks/test_CABlock.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,7 @@
3636
(2, params["dim"], *([16] * params["spatial_dims"])),
3737
(2, params["dim"], *([16] * params["spatial_dims"])),
3838
]
39-
for params in dict_product(
40-
spatial_dims=[2, 3],
41-
dim=[32, 64, 128],
42-
num_heads=[2, 4, 8],
43-
bias=[True, False],
44-
)
39+
for params in dict_product(spatial_dims=[2, 3], dim=[32, 64, 128], num_heads=[2, 4, 8], bias=[True, False])
4540
]
4641

4742

tests/networks/blocks/test_crossattention.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@
4040
(2, 512, params["hidden_size"]),
4141
]
4242
for params in dict_product(
43-
dropout_rate=np.linspace(0, 1, 4),
44-
hidden_size=[360, 480, 600, 768],
45-
num_heads=[4, 6, 8, 12],
46-
rel_pos_embedding_val=[None, RelPosEmbedding.DECOMPOSED],
47-
input_size=[(16, 32), (8, 8, 8)],
48-
flash_attn=[True, False],
49-
)]
43+
dropout_rate=np.linspace(0, 1, 4),
44+
hidden_size=[360, 480, 600, 768],
45+
num_heads=[4, 6, 8, 12],
46+
rel_pos_embedding_val=[None, RelPosEmbedding.DECOMPOSED],
47+
input_size=[(16, 32), (8, 8, 8)],
48+
flash_attn=[True, False],
49+
)
50+
]
5051

5152

5253
class TestResBlock(unittest.TestCase):

tests/test_masked_autoencoder_vit.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from monai.networks import eval_mode
2020
from monai.networks.nets.masked_autoencoder_vit import MaskedAutoEncoderViT
21-
from tests.test_utils import skip_if_quick, dict_product
21+
from tests.test_utils import dict_product, skip_if_quick
2222

2323
TEST_CASE_MaskedAutoEncoderViT = []
2424

@@ -62,11 +62,7 @@
6262
if nd == 2:
6363
model_params["spatial_dims"] = 2
6464

65-
test_case = [
66-
model_params,
67-
input_shape,
68-
expected_shape,
69-
]
65+
test_case = [model_params, input_shape, expected_shape]
7066
TEST_CASE_MaskedAutoEncoderViT.append(test_case)
7167

7268
TEST_CASE_ill_args = [

0 commit comments

Comments
 (0)