tensorflow / tensorflow/model-optimization
QAT for subclass inside the subclass
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 349
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 1
Description
I have one subclass A, which contains another subclass B inside it. I find subclass B in fact didn't get quanted.
class A ():
self.layers=[]
self.layers.append(Dense)
self.layers.append(class B)
class A_quant(A):
self.layers[0]=QuantizeWrapperV2(Dense, quant_config)
_config=B.get_config()
quant_layer=B_quant.from_config(_config)
self.layers[1]=quant_layer
Well, everything runs fine of quant_anonatize and quant_apply. Then I find only the Dense in Class A is quant, the denses in Class B doesn't get quant.
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.
Research direction
Start by reproducing the nested-subclass case described for class A, subclass B, Dense, quant_anonatize, and quant_apply. Trace why the Dense layers inside B remain unquantized while the Dense layer in A is wrapped; done means nested subclass layers receive quantization as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- keras, python, tensorflow
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100