Trait ModuleMapper

Source
pub trait ModuleMapper<B>
where B: Backend,
{ // Provided methods fn map_float<const D: usize>( &mut self, _id: ParamId, tensor: Tensor<B, D>, ) -> Tensor<B, D> { ... } fn map_int<const D: usize>( &mut self, _id: ParamId, tensor: Tensor<B, D, Int>, ) -> Tensor<B, D, Int> { ... } fn map_bool<const D: usize>( &mut self, _id: ParamId, tensor: Tensor<B, D, Bool>, ) -> Tensor<B, D, Bool> { ... } }
Expand description

Module mapper trait.

Provided Methods§

Source

fn map_float<const D: usize>( &mut self, _id: ParamId, tensor: Tensor<B, D>, ) -> Tensor<B, D>

Map a float tensor in the module.

Source

fn map_int<const D: usize>( &mut self, _id: ParamId, tensor: Tensor<B, D, Int>, ) -> Tensor<B, D, Int>

Map an int tensor in the module.

Source

fn map_bool<const D: usize>( &mut self, _id: ParamId, tensor: Tensor<B, D, Bool>, ) -> Tensor<B, D, Bool>

Map a bool tensor in the module.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<B> ModuleMapper<B> for Quantizer
where B: Backend,