Failed quantization of dilated convolution layers: tensorflow or tensorflow-model-optimization bug?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- keras, python
- Domain
- machine-learning
Research direction
Start by reading the linked TensorFlow issues and reproducing the failure with a dilated tf.keras.layers.Conv2D quantization case. Compare that path with the suggested tf.nn.conv2d workaround and determine whether TensorFlow or TensorFlow Model Optimization is responsible. Done means the responsible component and a concrete fix scope are established.
Written by the indexing model from the issue text.
Description
Describe the bug
Tensorflow model optimization fails to quantize dilated convolution layers.
System information
TensorFlow version (installed from source or binary): source
TensorFlow Model Optimization version (installed from source or binary): source
Python version: 3.10.12
Describe the expected behavior
Quantizing dilated convolutions should be essentially the same as any other layer.
Describe the current behavior
Either tf or tfmot is silently failing. There is the following very old issue describing exactly this:
https://github.com/tensorflow/tensorflow/issues/26797
There is a slightly newer open issue showing that this was never resolved:
https://github.com/tensorflow/tensorflow/issues/53025
I am not 100% certain, but it seems like these issues are misplaced and should be designated as model-optimization issues.
There seems to be a workaround via using tf.nn.conv2d instead of tf.keras.layers.Conv2D, but as far as I can tell this would require layer subclassing which, based on other issues, is still buggy when it comes to quantization.
Code to reproduce the issue
See afformentioned issues.
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 349
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 1
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.
More from tensorflow/model-optimization
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
tensorflow/model-optimization#1301 · 1 comment ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
tensorflow/model-optimization#1272 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 50/100
tensorflow/model-optimization#1270 · 2 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
tensorflow/model-optimization#1241 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
tensorflow/model-optimization#1182 · 1 comment ·
All issues in tensorflow/model-optimization
Similar issues
-
essnmx good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
[Feature] 奇物选择添加优先级 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Giskard-AI/giskard-oss#2840 · 1 comment ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Openarea: repo bug perceived difficulty: 2
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
yeti-platform/yeti#1380 ·