Hi, I'm trying to apply tfmot for an implementation of BiSeNetV2, when executing tfmot.quantization.keras.quantize_model, I meet errors with the following operations:
tf.reduce_mean: Layer tf.math.reduce_mean:<class 'tensorflow.python.keras.layers.core.TFOpLambda'> is not supported. You can quantize this layer by passing a tfmot.quantization.keras.QuantizeConfig instance to the quantize_annotate_layer API.
tf.nn.sigmoid: Exception has occurred: RuntimeError
Layer tf.math.sigmoid_1:<class 'tensorflow.python.keras.layers.core.TFOpLambda'> is not supported. You can quantize this layer by passing a tfmot.quantization.keras.QuantizeConfig instance to the quantize_annotate_layer API.
tf.image.resize: Exception has occurred: ValueError 'images' must have either 3 or 4 dimensions.
For layer tf.reduce_mean and tf.nn.sigmoid, the class is tensorflow.python.keras.layers.core.TFOpLambda, and they are failed to be executed with tfmot.quantization.keras.QuantizeConfig. How to apply these layers to tfmot?
How to effectively apply tf.image.resize to tfmot model?
The followings are the settings of TensorFlow:
TensorFlow-gpu 2.4.0
tensorflow-model-optimization 0.7.1
Hi, I'm trying to apply tfmot for an implementation of BiSeNetV2, when executing
tfmot.quantization.keras.quantize_model
, I meet errors with the following operations:tf.reduce_mean: Layer tf.math.reduce_mean:<class 'tensorflow.python.keras.layers.core.TFOpLambda'> is not supported. You can quantize this layer by passing a
tfmot.quantization.keras.QuantizeConfig
instance to thequantize_annotate_layer
API. tf.nn.sigmoid: Exception has occurred: RuntimeError Layer tf.math.sigmoid_1:<class 'tensorflow.python.keras.layers.core.TFOpLambda'> is not supported. You can quantize this layer by passing atfmot.quantization.keras.QuantizeConfig
instance to thequantize_annotate_layer
API.tf.image.resize: Exception has occurred: ValueError 'images' must have either 3 or 4 dimensions.
tf.reduce_mean
andtf.nn.sigmoid
, the class istensorflow.python.keras.layers.core.TFOpLambda
, and they are failed to be executed withtfmot.quantization.keras.QuantizeConfig
. How to apply these layers to tfmot?tf.image.resize
to tfmot model?The followings are the settings of TensorFlow: TensorFlow-gpu 2.4.0 tensorflow-model-optimization 0.7.1
Best Regards, Rahn