MCPcopy
hub / github.com/nitrain/nitrain / test_to_keras

Method test_to_keras

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

Source from the content-addressed store, hash-verified

90 loader_test = loader_train.copy(ds_test, drop_transforms=True)
91
92 def test_to_keras(self):
93 loader = nt.Loader(self.dataset_2d, images_per_batch=4)
94 keras_loader = loader.to_keras()
95 x_batch, y_batch = next(iter(keras_loader))
96 self.assertEqual(x_batch.shape, (4, 256, 256, 1))
97
98 gen = record_generator(loader)
99 xb,yb = next(iter(gen))
100
101 def test_keras_multi(self):
102 img2d = ants.image_read(ants.get_data('r16'))

Callers

nothing calls this directly

Calls 2

to_kerasMethod · 0.95
record_generatorFunction · 0.90

Tested by

no test coverage detected