(microbatch, *args)
| 191 | |
| 192 | |
| 193 | def split_microbatches(microbatch, *args): |
| 194 | bs = len(args[0]) |
| 195 | if microbatch == -1 or microbatch >= bs: |
| 196 | yield tuple(args) |
| 197 | else: |
| 198 | for i in range(0, bs, microbatch): |
| 199 | yield tuple(x[i : i + microbatch] if x is not None else None for x in args) |
| 200 | |
| 201 | |
| 202 | def create_argparser(): |
no outgoing calls
no test coverage detected