| 1802 | ADDITIONAL_CONFIGS = combinations_grid(split=("train", "test", "extra")) |
| 1803 | |
| 1804 | def inject_fake_data(self, tmpdir, config): |
| 1805 | import scipy.io as sio |
| 1806 | |
| 1807 | split = config["split"] |
| 1808 | num_examples = { |
| 1809 | "train": 2, |
| 1810 | "test": 3, |
| 1811 | "extra": 4, |
| 1812 | }.get(split) |
| 1813 | |
| 1814 | file = f"{split}_32x32.mat" |
| 1815 | images = np.zeros((32, 32, 3, num_examples), dtype=np.uint8) |
| 1816 | targets = np.zeros((num_examples,), dtype=np.uint8) |
| 1817 | sio.savemat(os.path.join(tmpdir, file), {"X": images, "y": targets}) |
| 1818 | return num_examples |
| 1819 | |
| 1820 | |
| 1821 | class Places365TestCase(datasets_utils.ImageDatasetTestCase): |