tensorflow / tensorflow/model-optimization
Unsupported operations when applying tfmot
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 349
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 1
Description
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_meanandtf.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? - How to effectively apply
tf.image.resizeto tfmot model?
The followings are the settings of TensorFlow:
TensorFlow-gpu 2.4.0
tensorflow-model-optimization 0.7.1
Best Regards,
Rahn
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.