Args: ds (DataFlow): input DataFlow num (int): number of times to repeat each datapoint.
(self, ds, num)
| 399 | """ |
| 400 | |
| 401 | def __init__(self, ds, num): |
| 402 | """ |
| 403 | Args: |
| 404 | ds (DataFlow): input DataFlow |
| 405 | num (int): number of times to repeat each datapoint. |
| 406 | """ |
| 407 | self.num = int(num) |
| 408 | assert self.num >= 1, self.num |
| 409 | super(RepeatedDataPoint, self).__init__(ds) |
| 410 | |
| 411 | def __len__(self): |
| 412 | return len(self.ds) * self.num |