(batch)
| 291 | batch_size = len(batch1) |
| 292 | |
| 293 | def _verify_batch_size(batch): |
| 294 | if isinstance(batch, dali.backend.TensorListCPU) or isinstance(batch, list): |
| 295 | tested_batch_size = len(batch) |
| 296 | else: |
| 297 | tested_batch_size = batch.shape[0] |
| 298 | assert ( |
| 299 | tested_batch_size == batch_size |
| 300 | ), "Incorrect batch size. Expected: {}, actual: {}".format(batch_size, tested_batch_size) |
| 301 | |
| 302 | _verify_batch_size(batch1) |
| 303 | _verify_batch_size(batch2) |