Rate this Page

linear#

classtorch.ao.nn.quantized.functional.linear(input,weight,bias=None,scale=None,zero_point=None)[source]#

Applies a linear transformation to the incoming quantized data:y=xAT+by = xA^T + b.SeeLinear

Note

Current implementation packs weights on every call, which has penalty on performance.If you want to avoid the overhead, useLinear.

Parameters
  • input (Tensor) – Quantized input of typetorch.quint8

  • weight (Tensor) – Quantized weight of typetorch.qint8

  • bias (Tensor) – None or fp32 bias of typetorch.float

  • scale (double) – output scale. If None, derived from the input scale

  • zero_point (python:long) – output zero point. If None, derived from the input zero_point

Return type

Tensor

Shape: