Wrapper for static/dynamic batch
(data, batch_type='static', batch_size=16, max_frames_in_batch=12000, mode='train')
| 436 | |
| 437 | |
| 438 | def batch(data, batch_type='static', batch_size=16, max_frames_in_batch=12000, |
| 439 | mode='train'): |
| 440 | """ Wrapper for static/dynamic batch |
| 441 | """ |
| 442 | if mode == 'inference': |
| 443 | return static_batch(data, 1) |
| 444 | elif mode == 'processing': |
| 445 | return static_batch(data, batch_size) |
| 446 | else: |
| 447 | if batch_type == 'static': |
| 448 | return static_batch(data, batch_size) |
| 449 | elif batch_type == 'dynamic': |
| 450 | return dynamic_batch(data, max_frames_in_batch) |
| 451 | else: |
| 452 | logging.fatal('Unsupported batch type {}'.format(batch_type)) |
| 453 | |
| 454 | |
| 455 | def padding(data, mode='train'): |
nothing calls this directly
no test coverage detected