(self)
| 35 | self.ys = ys |
| 36 | |
| 37 | def get_iterator(self): |
| 38 | self.current_ind = 0 |
| 39 | |
| 40 | def _wrapper(): |
| 41 | while self.current_ind < self.num_batch: |
| 42 | start_ind = self.batch_size * self.current_ind |
| 43 | end_ind = min(self.size, self.batch_size * (self.current_ind + 1)) |
| 44 | x_i = self.xs[start_ind: end_ind, ...] |
| 45 | y_i = self.ys[start_ind: end_ind, ...] |
| 46 | yield (x_i, y_i) |
| 47 | self.current_ind += 1 |
| 48 | |
| 49 | return _wrapper() |
| 50 | |
| 51 | |
| 52 | class StandardScaler: |
no outgoing calls
no test coverage detected