Created
August 3, 2021 00:51
-
-
Save jerryzh168/07e296c19306171d1f4676cc7d87d7a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torchvision.models as models | |
import torch | |
from torch.quantization.quantize_fx import prepare_fx, convert_fx | |
rn18 = models.resnet18().eval() | |
qconfig_dict = {"": torch.quantization.default_qconfig} | |
rn18 = prepare_fx(rn18, qconfig_dict) | |
rn18 = convert_fx(rn18, is_reference=True) | |
print(rn18) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment