pub struct RescaleOperation<'c> { /* private fields */ }
Expand description
A rescale
operation. Tosa rescale operator.
Rescale quantized values into a new domain. Supported rescalings are: Mode Input Output signed 8 to 8 int8 int8 signed 8 to 16 int8 int16 signed 8 to 32 int8 int32 signed 16 to 8 int16 int8 signed 16 to 16 int16 int16 signed 16 to 32 int16 int32 signed 32 to 8 int32 int8 signed 32 to 16 int32 int16 signed 32 to 32 int32 int32 signed 48 to 8 int48 int8 signed 48 to 16 int48 int16 signed 48 to 32 int48 int32 unsigned 8 to signed 8 uint8 int8 signed 8 to unsigned 8 int8 uint8
Implementations§
source§impl<'c> RescaleOperation<'c>
impl<'c> RescaleOperation<'c>
sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
sourcepub fn builder(
context: &'c Context,
location: Location<'c>
) -> RescaleOperationBuilder<'c, Unset, Unset, Unset, Unset, Unset, Unset, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> RescaleOperationBuilder<'c, Unset, Unset, Unset, Unset, Unset, Unset, Unset, Unset, Unset>
Creates a builder.
pub fn output(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn input(&self) -> Result<Value<'c, '_>, Error>
pub fn input_zp(&self) -> Result<IntegerAttribute<'c>, Error>
pub fn set_input_zp(&mut self, value: IntegerAttribute<'c>)
pub fn output_zp(&self) -> Result<IntegerAttribute<'c>, Error>
pub fn set_output_zp(&mut self, value: IntegerAttribute<'c>)
pub fn multiplier(&self) -> Result<DenseI32ArrayAttribute<'c>, Error>
pub fn set_multiplier(&mut self, value: DenseI32ArrayAttribute<'c>)
pub fn shift(&self) -> Result<DenseI32ArrayAttribute<'c>, Error>
pub fn set_shift(&mut self, value: DenseI32ArrayAttribute<'c>)
pub fn scale_32(&self) -> Result<Attribute<'c>, Error>
pub fn set_scale_32(&mut self, value: Attribute<'c>)
pub fn double_round(&self) -> Result<Attribute<'c>, Error>
pub fn set_double_round(&mut self, value: Attribute<'c>)
pub fn per_channel(&self) -> Result<Attribute<'c>, Error>
pub fn set_per_channel(&mut self, value: Attribute<'c>)
Trait Implementations§
source§impl<'c> From<RescaleOperation<'c>> for Operation<'c>
impl<'c> From<RescaleOperation<'c>> for Operation<'c>
source§fn from(operation: RescaleOperation<'c>) -> Self
fn from(operation: RescaleOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for RescaleOperation<'c>
impl<'c> !Send for RescaleOperation<'c>
impl<'c> !Sync for RescaleOperation<'c>
impl<'c> Unpin for RescaleOperation<'c>
impl<'c> UnwindSafe for RescaleOperation<'c>
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