The tutorial here provides an example of per-channel quantization training.
In my case I need to perform per-tensor quantization since the downstream mobile-device inference library (e.g. TNN) does not support per-channel quantized models.
I think the problem here is how to setup a per-tensor quantization around: