Hi Jerry:
Thank you for your reply.
I am using the nightly version pytorch: ‘1.9.0.dev20210422+cu111’, torchvision: ‘0.10.0.dev20210422+cu111’
I tested your idea.
When I set model_one_fused = torch.quantization.fuse_modules(model_one,[[‘base.0’,‘base.1’]]),
the model works fine.
However, as long as I add more modules to it
e.g., model_one_fused = torch.quantization.fuse_modules(model_one,[[‘base.0’,‘base.1’,‘base.4.0.conv1’,‘base.4.0.bn1’,‘base.4.0.conv2’,‘base.4.0.bn2’]])
The system told me:
assert fuser_method is not None, "did not find fuser method for: {} ".format(op_list)
AssertionError: did not find fuser method for: (<class ‘torch.nn.modules.conv.Conv2d’>, <class ‘torch.nn.modules.batchnorm.BatchNorm2d’>, <class ‘torch.nn.modules.conv.Conv2d’>, <class ‘torch.nn.modules.batchnorm.BatchNorm2d’>, <class ‘torch.nn.modules.conv.Conv2d’>, <class ‘torch.nn.modules.batchnorm.BatchNorm2d’>)
Many thanks
Shixian