def test_next_batch_smaller(index):
Batch_size is twice as small as length DatasetIndex.
dsi = index("big")dsi.reset_iter()
for _ in range(SIZE*SIZE):
n_b = dsi.next_batch(batch_size=len(dsi)//2,
n_epochs=None,
drop_last=True)
After Change
def test_next_batch_smaller(all_indices):
"batch_size" is twice as small as length DatasetIndex.
dsi = all_indices()length = len(dsi)
for _ in range(SIZE**2):
n_b = dsi.next_batch(batch_size=length//2,
n_epochs=None,
drop_last=True)