As I understand it, we use the make_quant function to replace all specified linear layers with QuantLinear. However, if our linear layer is inherited from a class (e.g., super().forward() calling nn.Linear), how can we quantize this inherited linear layer?
class module(nn.Linear):
def __init__(self)
super().__init__()
def forward(self, x):
res = super().forward(x)
return res
As I understand it, we use the
make_quant
function to replace all specified linear layers with QuantLinear. However, if our linear layer is inherited from a class (e.g.,super().forward()
callingnn.Linear
), how can we quantize this inherited linear layer?