diff options
| author | YurenHao0426 <blackhao0426@gmail.com> | 2026-01-13 23:50:59 -0600 |
|---|---|---|
| committer | YurenHao0426 <blackhao0426@gmail.com> | 2026-01-13 23:50:59 -0600 |
| commit | 00cf667cee7ffacb144d5805fc7e0ef443f3583a (patch) | |
| tree | 77d20a3adaecf96bf3aff0612bdd3b5fa1a7dc7e /files/tests/test_data_io.py | |
| parent | c53c04aa1d6ff75cb478a9498c370baa929c74b6 (diff) | |
| parent | cd99d6b874d9d09b3bb87b8485cc787885af71f1 (diff) | |
Merge master into main
Diffstat (limited to 'files/tests/test_data_io.py')
| -rw-r--r-- | files/tests/test_data_io.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/files/tests/test_data_io.py b/files/tests/test_data_io.py new file mode 100644 index 0000000..1f2ccd8 --- /dev/null +++ b/files/tests/test_data_io.py @@ -0,0 +1,11 @@ +import torch +from files.data_io.dataset_loader import get_dataloader + + +def test_dataloader_shape(): + """Smoke test: verify dataloader output shape.""" + train_loader, _ = get_dataloader("data_io/configs/shd.yaml") + x, y = next(iter(train_loader)) + assert isinstance(x, torch.Tensor) + assert x.ndim == 3 + assert y.ndim == 1 |
