[−][src]Struct onnxruntime::tensor::ort_owned_tensor::OrtOwnedTensor
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
impl<'t, 'm, T, D> OrtOwnedTensor<'t, 'm, T, D> where
T: TypeToTensorElementDataType + Debug + Clone,
D: Dimension,
[src]
T: TypeToTensorElementDataType + Debug + Clone,
D: Dimension,
pub fn softmax(&self, axis: Axis) -> Array<T, D> where
D: RemoveAxis,
T: NdFloat + SubAssign + DivAssign,
[src]
D: RemoveAxis,
T: NdFloat + SubAssign + DivAssign,
Apply a softmax on the specified axis
Trait Implementations
impl<'t, 'm, T: Debug, D: Debug> Debug for OrtOwnedTensor<'t, 'm, T, D> where
T: TypeToTensorElementDataType + Debug + Clone,
D: Dimension,
'm: 't,
[src]
T: TypeToTensorElementDataType + Debug + Clone,
D: Dimension,
'm: 't,
impl<'t, 'm, T, D> Deref for OrtOwnedTensor<'t, 'm, T, D> where
T: TypeToTensorElementDataType + Debug + Clone,
D: Dimension,
[src]
T: TypeToTensorElementDataType + Debug + Clone,
D: Dimension,
type Target = ArrayView<'t, T, D>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<'t, 'm, T, D> Drop for OrtOwnedTensor<'t, 'm, T, D> where
T: TypeToTensorElementDataType + Debug + Clone,
D: Dimension,
'm: 't,
[src]
T: TypeToTensorElementDataType + Debug + Clone,
D: Dimension,
'm: 't,
Auto Trait Implementations
impl<'t, 'm, T, D> RefUnwindSafe for OrtOwnedTensor<'t, 'm, T, D> where
D: RefUnwindSafe,
T: RefUnwindSafe,
D: RefUnwindSafe,
T: RefUnwindSafe,
impl<'t, 'm, T, D> !Send for OrtOwnedTensor<'t, 'm, T, D>
impl<'t, 'm, T, D> !Sync for OrtOwnedTensor<'t, 'm, T, D>
impl<'t, 'm, T, D> Unpin for OrtOwnedTensor<'t, 'm, T, D> where
D: Unpin,
D: Unpin,
impl<'t, 'm, T, D> UnwindSafe for OrtOwnedTensor<'t, 'm, T, D> where
D: UnwindSafe,
T: RefUnwindSafe,
D: UnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,