Skip to content

Commit ccd8a7f

Browse files
committed
Reduce batch and image size for model tests
The old test setup failed on my 10GB ram machine due to out of memory issues.
1 parent 947a33c commit ccd8a7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/models/test_ModelsSimCLR.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def setUp(self):
1515
'resnet-101',
1616
'resnet-152'
1717
]
18-
self.batch_size = 4
18+
self.batch_size = 2
1919
self.input_tensor = torch.rand((self.batch_size, 3, 32, 32))
2020

2121
def test_create_variations_cpu(self):
@@ -59,8 +59,8 @@ def test_feature_dim_configurable(self):
5959
def test_variations_input_dimension(self):
6060
device = 'cuda' if torch.cuda.is_available() else 'cpu'
6161
for model_name in self.resnet_variants:
62-
for input_width in [16, 32, 64, 256]:
63-
for input_height in [16, 32, 64, 256]:
62+
for input_width in [16, 32, 64, 128]:
63+
for input_height in [16, 32, 64, 128]:
6464
model = ResNetSimCLR(name=model_name).to(device)
6565

6666
input_tensor = torch.rand((self.batch_size,

0 commit comments

Comments
 (0)