(batches)
| 20 | |
| 21 | |
| 22 | def combine_batches(batches): |
| 23 | full_x = torch.from_numpy(np.asarray([])).float() |
| 24 | full_y = torch.from_numpy(np.asarray([])).long() |
| 25 | for (batched_x, batched_y) in batches: |
| 26 | full_x = torch.cat((full_x, batched_x), 0) |
| 27 | full_y = torch.cat((full_y, batched_y), 0) |
| 28 | return [(full_x, full_y)] |
| 29 | |
| 30 | |
| 31 | def load_synthetic_data(args): |
no outgoing calls
no test coverage detected