Struct ort::tensor::ort_owned_tensor::OrtOwnedTensor
source · pub struct OrtOwnedTensor<'t, T, D>where
T: TensorDataToType,
D: Dimension,{ /* private fields */ }
Expand description
Tensor containing data owned by the ONNX Runtime C library, used to return values from inference.
This tensor type is returned by the Session::run()
method.
It is not meant to be created directly.
The tensor hosts an ndarray::ArrayView
of the data on the C side. This allows manipulation on the Rust side using ndarray
without copying the data.
OrtOwnedTensor
implements the std::deref::Deref
trait for ergonomic access to
the underlying ndarray::ArrayView
.
Implementations§
source§impl<'t, T, D> OrtOwnedTensor<'t, T, D>where
T: TensorDataToType,
D: Dimension + 't,
impl<'t, T, D> OrtOwnedTensor<'t, T, D>where T: TensorDataToType, D: Dimension + 't,
sourcepub fn view<'s>(&'s self) -> ViewHolder<'s, T, D>where
't: 's,
pub fn view<'s>(&'s self) -> ViewHolder<'s, T, D>where 't: 's,
Produce a ViewHolder
for the underlying data.
Trait Implementations§
Auto Trait Implementations§
impl<'t, T, D> RefUnwindSafe for OrtOwnedTensor<'t, T, D>where D: RefUnwindSafe, T: RefUnwindSafe,
impl<'t, T, D> !Send for OrtOwnedTensor<'t, T, D>
impl<'t, T, D> !Sync for OrtOwnedTensor<'t, T, D>
impl<'t, T, D> Unpin for OrtOwnedTensor<'t, T, D>where D: Unpin,
impl<'t, T, D> UnwindSafe for OrtOwnedTensor<'t, T, D>where D: UnwindSafe, T: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more