Returns the number of dimensions of the tensor produced by the given node
(node: Any)
| 440 | |
| 441 | |
| 442 | def ndim_of(node: Any) -> Optional[int]: |
| 443 | """ |
| 444 | Returns the number of dimensions of the tensor produced by the given node |
| 445 | """ |
| 446 | if not is_single_tensor_node(node): |
| 447 | return None |
| 448 | |
| 449 | return node.meta["val"].ndim |
| 450 | |
| 451 | |
| 452 | def is_unsqueezed_vector(node: torch.fx.Node) -> bool: |
nothing calls this directly
no test coverage detected