提交 686ba586 编写于 作者: J Jian Li 提交者: TensorFlower Gardener

Add int8 support in AddTensor.

PiperOrigin-RevId: 225249344
上级 b3b8dff0
......@@ -307,10 +307,12 @@ class SingleOpModel {
if (is_quantized) {
if (t.min != 0 || t.max != 0) {
// TODO(b/119422369): Handle signed int8 here.
if (t.type == TensorType_UINT8) {
std::tie(t.scale, t.zero_point) =
QuantizationParams<uint8_t>(t.min, t.max);
} else if (t.type == TensorType_INT8) {
std::tie(t.scale, t.zero_point) =
QuantizationParams<int8_t>(t.min, t.max);
} else if (t.type == TensorType_INT32) {
std::tie(t.scale, t.zero_point) =
QuantizationParams<int32_t>(t.min, t.max);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册