Skip to content

How to apply torch.quantization.quantize_dynamic for conv2d layer? #899

Open
@Midhilesh29

Description

@Midhilesh29

I am working on quantizing resnet50 model. I tried to use the following command.

quantized_model = torch.quantization.quantize_dynamic(
    resnet18, {torch.nn.Conv2d,torch.nn.Linear}, dtype=torch.qint8
)

But only the linear layer has quaantized but not the convolutional layer. Can anyone help me how to dynamically quantize the convolutional layer?

Metadata

Metadata

Assignees

No one assigned

    Labels

    quantizationIssues relating to quantization tutorials

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions