Skip to content

Commit

Permalink
CLEAR and TinyImageNet tests bugfixes (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhuteja12 authored Sep 29, 2023
1 parent abe3ab7 commit c5749b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/renate/data/test_data_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ def test_torchvision_data_module(tmpdir, dataset_name, num_tr, num_te, x_shape):
@pytest.mark.parametrize(
"dataset_name,chunk_id,num_tr,num_te",
[
("CLEAR10", 0, 2986, 500),
("CLEAR100", 0, 9945, 4984),
("CLEAR10", 0, 3300, 550),
("CLEAR100", 0, 9964, 5000),
],
)
def test_clear_data_module(tmpdir, dataset_name, chunk_id, num_tr, num_te):
"""Test loading of CLEAR data."""
val_size = 0.2
data_module = CLEARDataModule(
tmpdir, dataset_name=dataset_name, chunk_id=chunk_id, val_size=val_size
tmpdir, dataset_name=dataset_name, time_step=chunk_id, val_size=val_size
)
data_module.prepare_data()
data_module.setup()
Expand Down Expand Up @@ -131,7 +131,7 @@ def test_tiny_imagenet_data_module(tmpdir):
assert isinstance(val_data, Dataset)
assert len(test_data) == num_te
assert isinstance(test_data, Dataset)
assert train_data[0][0].size() == test_data[0][0].size() == (3, 64, 64)
assert train_data[0][0].size == test_data[0][0].size == (64, 64)


@pytest.mark.slow
Expand Down

0 comments on commit c5749b2

Please sign in to comment.