QuantizedOps

Trait QuantizedOps 

Source
pub trait QuantizedOps<Q: QuantizableInteger> {
    // Required methods
    fn qadd(
        &self,
        other: &QuantizedTensor<Q>,
    ) -> RusTorchResult<QuantizedTensor<Q>>;
    fn qsub(
        &self,
        other: &QuantizedTensor<Q>,
    ) -> RusTorchResult<QuantizedTensor<Q>>;
    fn qmul(
        &self,
        other: &QuantizedTensor<Q>,
    ) -> RusTorchResult<QuantizedTensor<Q>>;
    fn qmatmul(
        &self,
        other: &QuantizedTensor<Q>,
    ) -> RusTorchResult<QuantizedTensor<Q>>;
    fn qrelu(&self) -> RusTorchResult<QuantizedTensor<Q>>;
    fn qadd_scalar(&self, scalar: f32) -> RusTorchResult<QuantizedTensor<Q>>;
    fn qmul_scalar(&self, scalar: f32) -> RusTorchResult<QuantizedTensor<Q>>;
}
Expand description

Trait for quantized tensor operations 量子化テンソル演算のトレイト

Required Methods§

Source

fn qadd(&self, other: &QuantizedTensor<Q>) -> RusTorchResult<QuantizedTensor<Q>>

Add two quantized tensors 二つの量子化テンソルを加算

Source

fn qsub(&self, other: &QuantizedTensor<Q>) -> RusTorchResult<QuantizedTensor<Q>>

Subtract two quantized tensors 二つの量子化テンソルを減算

Source

fn qmul(&self, other: &QuantizedTensor<Q>) -> RusTorchResult<QuantizedTensor<Q>>

Multiply two quantized tensors 二つの量子化テンソルを乗算

Source

fn qmatmul( &self, other: &QuantizedTensor<Q>, ) -> RusTorchResult<QuantizedTensor<Q>>

Matrix multiplication for quantized tensors 量子化テンソルの行列乗算

Source

fn qrelu(&self) -> RusTorchResult<QuantizedTensor<Q>>

Quantized ReLU activation 量子化ReLU活性化関数

Source

fn qadd_scalar(&self, scalar: f32) -> RusTorchResult<QuantizedTensor<Q>>

Add scalar to quantized tensor 量子化テンソルにスカラーを加算

Source

fn qmul_scalar(&self, scalar: f32) -> RusTorchResult<QuantizedTensor<Q>>

Multiply quantized tensor by scalar 量子化テンソルをスカラーで乗算

Implementors§