yobx.helpers.torch_helper¶
- yobx.helpers.torch_helper.onnx_dtype_to_torch_dtype(itype: int) dtype[source][source]¶
Converts an onnx type into a torch dtype.
- Parameters:
to – onnx dtype
- Returns:
torch dtype
- yobx.helpers.torch_helper.to_numpy(tensor: Tensor) ndarray[source][source]¶
Converts a
torch.Tensortonumpy.ndarray.