You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To make using this library easier in downstream projects, it would help to have more documentation / examples etc. around converting to/from tensors/arrays in other libraries.
The unwraps above will fail if the layout is not contiguous.
Outputs from RTen model execution are always contiguous / in standard order. If it is not certain that a tensor is in standard order, then Tensor::to_contiguous (RTen) or ArrayView::as_standard_layout can be used to get a contiguous layout tensor, copying only if necessary.
The text was updated successfully, but these errors were encountered:
To make using this library easier in downstream projects, it would help to have more documentation / examples etc. around converting to/from tensors/arrays in other libraries.
In the meantime, here are some useful resources:
Cheatsheet
For the case where the tensor/array is "contiguous" (RTen terminology) or "standard layout" (ndarray terminology):
ndarray -> RTen:
RTen -> ndarray:
The
unwrap
s above will fail if the layout is not contiguous.Outputs from RTen model execution are always contiguous / in standard order. If it is not certain that a tensor is in standard order, then Tensor::to_contiguous (RTen) or ArrayView::as_standard_layout can be used to get a contiguous layout tensor, copying only if necessary.
The text was updated successfully, but these errors were encountered: