-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Torch FX] PTQ MinMax parameters test #2989
[Torch FX] PTQ MinMax parameters test #2989
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rk119, thank you for the contribution! One small comment from my side:
tests/torch/fx/test_ptq_params.py
Outdated
class LinearTestModel(nn.Module): | ||
INPUT_SIZE = None | ||
|
||
def __init__(self): | ||
super().__init__() | ||
self.conv1 = create_conv(3, 3, 1) | ||
self.bn1 = create_bn(3) | ||
self.relu = nn.ReLU() | ||
self.avg_pool = nn.AdaptiveAvgPool2d(1) | ||
self.conv2 = create_conv(3, 1, 1) | ||
self.bn2 = create_bn(1) | ||
|
||
def forward(self, x): | ||
x = self.relu(self.conv1(x)) | ||
x = self.bn1(x) | ||
x = self.avg_pool(x) | ||
x = self.relu(self.conv2(x)) | ||
x = self.bn2(x) | ||
return x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rk119, could you please put this model to nncf/tests/torch/test_models/synthetic.py
with a name LinearPTQParamsTestModel and reuse it in both Torch and TorchFX tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rk119, could you please put this model to
nncf/tests/torch/test_models/synthetic.py
with a name LinearPTQParamsTestModel and reuse it in both Torch and TorchFX tests?
Alright.
Changes
New test file added in tests/torch/fx. Implemented TemplateTestPTQParams for PTQ MinMax for TorchFX backend.
Related tickets
#2873