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_mean(
&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>;
fn stft(
&self,
frame_step: i32,
window: Option<NdTensorView<'_, f32, 1>>,
frame_length: Option<i32>,
onesided: bool,
) -> Result<NdTensor<f32, 4>, 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§
fn matmul(&self, other: TensorView<'_>) -> Result<Tensor, OpError>
fn reduce_l2( &self, axes: Option<&[i32]>, keep_dims: bool, ) -> Result<Tensor, OpError>
fn reduce_mean( &self, axes: Option<&[i32]>, keep_dims: bool, ) -> Result<Tensor, OpError>
Sourcefn resize_image(&self, size: [usize; 2]) -> Result<Tensor, OpError>
fn resize_image(&self, size: [usize; 2]) -> Result<Tensor, OpError>
Resize an NCHW image tensor to a given [height, width] using bilinear
interpolation.
fn softmax(&self, axis: isize) -> Result<Tensor, OpError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".