pytorch / pytorch/vision

quantized fuse_model should have an inplace argument

Open
#1,569 1 comment 0 reactions 1 assignee View on GitHub

@raghuramank100 is already working on this.

Since Nov 12, 2019.

module: models.quantization
Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.