Call clone() on a tensor. Args: x (Any): Object to be called. Returns: Any: The cloned object.
(x: Any)
| 162 | |
| 163 | |
| 164 | def clone(x: Any) -> Any: |
| 165 | """Call clone() on a tensor. |
| 166 | |
| 167 | Args: |
| 168 | x (Any): Object to be called. |
| 169 | |
| 170 | Returns: |
| 171 | Any: The cloned object. |
| 172 | """ |
| 173 | if isinstance(x, torch.Tensor): |
| 174 | return x.clone() |
| 175 | return x |
| 176 | |
| 177 | |
| 178 | def release_tensor_data(x: Any) -> Any: |
nothing calls this directly
no test coverage detected
searching dependent graphs…