tensorflow/model-optimization

QAT for subclass inside the subclass

t7hua opened this issue · 2 comments

t7hua commented

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.

@Xhark could you take a look at this issue?

Xhark commented

Hi, Would you please explain how did you make Q_quant more details?
Is that quantized if you only use B_quant class?