(dim: str)
| 377 | dim2val_cache = {} |
| 378 | |
| 379 | def dim2val(dim: str): |
| 380 | if dim in dim2val_cache: |
| 381 | return dim2val_cache[dim] |
| 382 | for i, shape in enumerate(shapes): |
| 383 | if dim in shape: |
| 384 | dim2val_cache[dim] = inputs[i].shape[shape.index(dim)] |
| 385 | break |
| 386 | return dim2val_cache[dim] |
| 387 | |
| 388 | def dims2val(dims: str): |
| 389 | if len(dims) == 0: |
nothing calls this directly
no test coverage detected