Skip to content

quantized fuse_model should have an inplace argument #1569

Open
@z-a-f

Description

@z-a-f

Currently if the user wants to have the fused model while preserving the original, they have to do

import copy
import torchvision.models.quantization as models

model = models.resnet18(pretrained=True, progress=True, quantize=False)
model_fused = copy.deepcopy(model)
model_fused.fuse_model()

Given that the quantization API provides an inplace variant for the torch.quantization.fuse_modules, we need to have an option for inplace in the model methods as well.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions