(self, x, y)
| 24 | self.shuffle = shuffle |
| 25 | |
| 26 | def __call__(self, x, y): |
| 27 | # create slices of all images |
| 28 | x = create_slices(x, self.axis) |
| 29 | y = create_slices(y, self.axis) |
| 30 | # then create patches from all those slices |
| 31 | x, y = create_patches(x, y, self.patch_size, self.stride) |
| 32 | |
| 33 | self.x = x |
| 34 | self.y = y |
| 35 | self.n_batches = math.ceil(len(x) / self.batch_size) |
| 36 | |
| 37 | return self |
| 38 | |
| 39 | def __iter__(self): |
| 40 | """ |
nothing calls this directly
no test coverage detected