diff --git a/tensorflow/lite/tools/optimize/operator_property.h b/tensorflow/lite/tools/optimize/operator_property.h index 39eeb60fe5f..bd5a94b6075 100644 --- a/tensorflow/lite/tools/optimize/operator_property.h +++ b/tensorflow/lite/tools/optimize/operator_property.h @@ -22,6 +22,17 @@ namespace tflite { namespace optimize { namespace operator_property { +// The scales of a certain tensor can be derived from the multiplications of all +// the scales. For example, for bias in conv, derived_scale = {{0, 1}, {}, {}} +// and for lstm gate bias, the derived scale is {{}, {0}, {2^-10}} +struct DerivedScale { + std::vector input_tensors = {}; + std::vector intermediate_tensors = {}; + // This is a list of extra factors that are not associated with any other + // tensor. + std::vector factors = {}; +}; + struct TensorProperty { // per_axis also implies symmetric currently. bool per_axis = false;