---
title: "QConv"
sidebar_label: "QConv"
description: "The clika_runtime.nn QConv class."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

QConv(in_channels, out_channels, kernel, *, stride=None, padding=None, dilation=None, groups=1, bias=True, padding_mode="zeros", value=None, activation=None, dtype=None, device=None)

    Static-quant channels-last convolution: quantized weight AND quantized
    activations; the forward returns floating point, or a quantized tensor
    once an output requant is bound with :meth:`set_output_quantization`.
    The same knobs as :class:`Conv`.
    

## `__init__`

```python
__init__(self, in_channels: 'int', out_channels: 'int', kernel: 'Sequence[int]', *, stride: 'Sequence[int] | None' = None, padding: 'Sequence[int] | None' = None, dilation: 'Sequence[int] | None' = None, groups: 'int' = 1, bias: 'bool' = True, padding_mode: 'PaddingModeLike' = 'zeros', value: 'float | None' = None, activation: 'ActivationLike' = None, dtype: 'DtypeLike | None' = None, device: 'Device | str | None' = None) -> 'None'
```

Initialize self.  See help(type(self)) for accurate signature.

## `forward`

```python
forward(self, input: 'QTensor') -> 'Tensor'
```

forward(input) -> Tensor

Quantized channels-last activations to ``[batch, *spatial',
out_channels]`` (floating point, or quantized once an output
requant is bound).

## `set_output_quantization`

```python
set_output_quantization(self, scale: 'Tensor', zero_point: 'Tensor | None' = None, *, quant_axis: 'int' = -1, out_dtype: 'DtypeLike | None' = None) -> 'None'
```

set_output_quantization(scale, zero_point=None, *, quant_axis=-1, out_dtype=None) -> None

Bind the output requant: the forward then returns a quantized
tensor at the bound scheme. Never calling it keeps the
floating-point output path.
