(shape)
| 1920 | |
| 1921 | |
| 1922 | def _normalize_shape_spec(shape): |
| 1923 | if isinstance(shape, list): |
| 1924 | return tuple(_normalize_shape_spec(item) for item in shape) |
| 1925 | if isinstance(shape, tuple): |
| 1926 | return tuple(_normalize_shape_spec(item) if isinstance(item, list) else item for item in shape) |
| 1927 | return shape |
| 1928 | |
| 1929 | |
| 1930 | def _infer_subparam_logical_shapes(weight_shape, shape, partition_dim, name=None): |
no outgoing calls
no test coverage detected