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§
Sourcefn qadd(&self, other: &QuantizedTensor<Q>) -> RusTorchResult<QuantizedTensor<Q>>
fn qadd(&self, other: &QuantizedTensor<Q>) -> RusTorchResult<QuantizedTensor<Q>>
Add two quantized tensors 二つの量子化テンソルを加算
Sourcefn qsub(&self, other: &QuantizedTensor<Q>) -> RusTorchResult<QuantizedTensor<Q>>
fn qsub(&self, other: &QuantizedTensor<Q>) -> RusTorchResult<QuantizedTensor<Q>>
Subtract two quantized tensors 二つの量子化テンソルを減算
Sourcefn qmul(&self, other: &QuantizedTensor<Q>) -> RusTorchResult<QuantizedTensor<Q>>
fn qmul(&self, other: &QuantizedTensor<Q>) -> RusTorchResult<QuantizedTensor<Q>>
Multiply two quantized tensors 二つの量子化テンソルを乗算
Sourcefn qmatmul(
&self,
other: &QuantizedTensor<Q>,
) -> RusTorchResult<QuantizedTensor<Q>>
fn qmatmul( &self, other: &QuantizedTensor<Q>, ) -> RusTorchResult<QuantizedTensor<Q>>
Matrix multiplication for quantized tensors 量子化テンソルの行列乗算
Sourcefn qrelu(&self) -> RusTorchResult<QuantizedTensor<Q>>
fn qrelu(&self) -> RusTorchResult<QuantizedTensor<Q>>
Quantized ReLU activation 量子化ReLU活性化関数
Sourcefn qadd_scalar(&self, scalar: f32) -> RusTorchResult<QuantizedTensor<Q>>
fn qadd_scalar(&self, scalar: f32) -> RusTorchResult<QuantizedTensor<Q>>
Add scalar to quantized tensor 量子化テンソルにスカラーを加算
Sourcefn qmul_scalar(&self, scalar: f32) -> RusTorchResult<QuantizedTensor<Q>>
fn qmul_scalar(&self, scalar: f32) -> RusTorchResult<QuantizedTensor<Q>>
Multiply quantized tensor by scalar 量子化テンソルをスカラーで乗算