(data)
| 39 | |
| 40 | |
| 41 | def _get_batch_shape(data): |
| 42 | if isinstance(data, (list, tuple, _tensors.TensorListCPU, _tensors.TensorListGPU)): |
| 43 | if len(data) == 0: |
| 44 | return [], True |
| 45 | else: |
| 46 | return [_get_shape(x) for x in data], False |
| 47 | else: |
| 48 | shape = _get_shape(data) |
| 49 | return [shape[1:]] * shape[0], True |
| 50 | |
| 51 | |
| 52 | def _check_data_batch(data, batch_size, layout): |
no test coverage detected