(self, x, y)
| 15 | self.shuffle = shuffle |
| 16 | |
| 17 | def __call__(self, x, y): |
| 18 | # create slices of all images |
| 19 | self.x = create_slices(x, self.axis) |
| 20 | self.y = create_slices(y, self.axis) |
| 21 | |
| 22 | xx = self.x[0] |
| 23 | if isinstance(xx, list): |
| 24 | while isinstance(xx, list): |
| 25 | batch_length = len(xx) |
| 26 | xx = xx[0] |
| 27 | else: |
| 28 | batch_length = len(self.x) |
| 29 | |
| 30 | self.batch_length = batch_length |
| 31 | self.n_batches = math.ceil(batch_length / self.batch_size) |
| 32 | |
| 33 | return self |
| 34 | |
| 35 | def __iter__(self): |
| 36 | """ |
nothing calls this directly
no test coverage detected