MCPcopy
hub / github.com/nitrain/nitrain / test_2d_channels_first

Method test_2d_channels_first

tests/test_loaders.py:61–73  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

59 rep = loader.__repr__()
60
61 def test_2d_channels_first(self):
62 loader = nt.Loader(self.dataset_2d, images_per_batch=4,
63 channels_first=True)
64
65 x_batch, y_batch = next(iter(loader))
66 self.assertTrue(x_batch.shape == (4, 1, 256, 256))
67
68 loader2 = loader.to_keras()
69 x_batch, y_batch = next(iter(loader2))
70 self.assertTrue(x_batch.shape == (4, 1, 256, 256))
71
72 gen = record_generator(loader)
73 xb,yb = next(iter(gen))
74
75 def test_copy(self):
76 import ants

Callers

nothing calls this directly

Calls 2

to_kerasMethod · 0.95
record_generatorFunction · 0.90

Tested by

no test coverage detected