Trait rten::ops::FloatOperators

source ·
pub trait FloatOperators {
    // Required methods
    fn matmul(&self, other: TensorView<'_>) -> Result<Tensor, OpError>;
    fn reduce_l2(
        &self,
        axes: Option<&[i32]>,
        keep_dims: bool
    ) -> Result<Tensor, OpError>;
    fn reduce_max(
        &self,
        axes: Option<&[i32]>,
        keep_dims: bool
    ) -> Result<Tensor, OpError>;
    fn reduce_mean(
        &self,
        axes: Option<&[i32]>,
        keep_dims: bool
    ) -> Result<Tensor, OpError>;
    fn reduce_min(
        &self,
        axes: Option<&[i32]>,
        keep_dims: bool
    ) -> Result<Tensor, OpError>;
    fn resize_image(&self, size: [usize; 2]) -> Result<Tensor, OpError>;
    fn softmax(&self, axis: isize) -> Result<Tensor, OpError>;
}
Expand description

Trait which exposes ONNX operators as methods of tensors.

This trait provides methods which are only available on float tensors.

Required Methods§

source

fn matmul(&self, other: TensorView<'_>) -> Result<Tensor, OpError>

source

fn reduce_l2( &self, axes: Option<&[i32]>, keep_dims: bool ) -> Result<Tensor, OpError>

source

fn reduce_max( &self, axes: Option<&[i32]>, keep_dims: bool ) -> Result<Tensor, OpError>

source

fn reduce_mean( &self, axes: Option<&[i32]>, keep_dims: bool ) -> Result<Tensor, OpError>

source

fn reduce_min( &self, axes: Option<&[i32]>, keep_dims: bool ) -> Result<Tensor, OpError>

source

fn resize_image(&self, size: [usize; 2]) -> Result<Tensor, OpError>

Resize an NCHW image tensor to a given [height, width] using bilinear interpolation.

source

fn softmax(&self, axis: isize) -> Result<Tensor, OpError>

Implementations on Foreign Types§

source§

impl<S: AsRef<[f32]>> FloatOperators for TensorBase<f32, S, DynLayout>

source§

fn matmul(&self, other: TensorView<'_>) -> Result<Tensor, OpError>

source§

fn reduce_l2( &self, axes: Option<&[i32]>, keep_dims: bool ) -> Result<Tensor, OpError>

source§

fn reduce_max( &self, axes: Option<&[i32]>, keep_dims: bool ) -> Result<Tensor, OpError>

source§

fn reduce_min( &self, axes: Option<&[i32]>, keep_dims: bool ) -> Result<Tensor, OpError>

source§

fn reduce_mean( &self, axes: Option<&[i32]>, keep_dims: bool ) -> Result<Tensor, OpError>

source§

fn resize_image(&self, size: [usize; 2]) -> Result<Tensor, OpError>

source§

fn softmax(&self, axis: isize) -> Result<Tensor, OpError>

source§

impl<S: AsRef<[f32]>, const N: usize> FloatOperators for TensorBase<f32, S, NdLayout<N>>

source§

fn matmul(&self, other: TensorView<'_>) -> Result<Tensor, OpError>

source§

fn reduce_l2( &self, axes: Option<&[i32]>, keep_dims: bool ) -> Result<Tensor, OpError>

source§

fn reduce_max( &self, axes: Option<&[i32]>, keep_dims: bool ) -> Result<Tensor, OpError>

source§

fn reduce_min( &self, axes: Option<&[i32]>, keep_dims: bool ) -> Result<Tensor, OpError>

source§

fn reduce_mean( &self, axes: Option<&[i32]>, keep_dims: bool ) -> Result<Tensor, OpError>

source§

fn resize_image(&self, size: [usize; 2]) -> Result<Tensor, OpError>

source§

fn softmax(&self, axis: isize) -> Result<Tensor, OpError>

Implementors§