Hi,
I want to add certain offset or error value to a quantized tensor qint8, I want each value in quantized tensor to be updated by error times its value + old value. Below code shows this manipulation with normal tensor, can please anyone suggest how similar thing can be achieved for qint8.
@HDCharles @jerryzh168
import torch
t = torch.tensor([-1.0, 0.0, 1.0, 2.0])
error = 3
# add an error of 3%
t = t + (0.03)*t
qt = torch.quantize_per_tensor(torch.tensor([-1.0, 0.0, 1.0, 2.0]), 0, 10, torch.quint8)
# How can such error addition be done on quantized tensors