Xilinx / brevitas

Brevitas: neural network quantization in PyTorch

Home Page:https://xilinx.github.io/brevitas/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QuantTensor always valid

Giuseppe5 opened this issue · comments

At the moment, when we sum or concatenate two QuantTensors at training time, we do not assume anything about their scale factors, and we average them.

The drawback of this approach is that the resulting QuantTensor is not valid, i.e. cannot be converted to its integer representation.
A better approach would be to adjust scale factors and bitwidth to make sure that the resulting QuantTensor is always valid.

@nickfraser Your input would be appreciated here :)