| Conditions | 5 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | #!/usr/bin/env python |
||
| 21 | def _yield_data(self, subset): |
||
| 22 | for i in xrange(0, len(subset), self.size): |
||
| 23 | x_set, y_set = [], [] |
||
| 24 | batch = pad_dataset(subset[i:i + self.size], PADDING_SIDE, self.padding_length) |
||
| 25 | for x, y in batch: |
||
| 26 | x_set.append(x) |
||
| 27 | y_set.append(y) |
||
| 28 | x_set = np.array(x_set) |
||
| 29 | y_set = np.array(y_set) |
||
| 30 | if self._fix_batch_size and x_set.shape[0] != self.size: |
||
| 31 | continue |
||
| 32 | yield x_set, y_set |