Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# print before JIT'ing
print(per_channel_quantized_model)
VGG(
(features): Sequential(
(0): QuantizedConv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), scale=0.0873441994190216, zero_point=119, paddi
ng=(1, 1))
(1): QuantizedReLU(inplace=True)
(2): QuantizedConv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), scale=0.19133853912353516, zero_point=148, pad
ding=(1, 1))
(3): QuantizedReLU(inplace=True)
(4): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
(5): QuantizedConv2d(64, 128, kernel_size=(3, 3), stride=(1, 1), scale=0.30967867374420166, zero_point=167, pa
dding=(1, 1))
(6): QuantizedReLU(inplace=True)
(7): QuantizedConv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), scale=0.3568974435329437, zero_point=140, pa
dding=(1, 1))
(8): QuantizedReLU(inplace=True)
(9): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
(10): QuantizedConv2d(128, 256, kernel_size=(3, 3), stride=(1, 1), scale=0.46770742535591125, zero_point=142,
padding=(1, 1))
(11): QuantizedReLU(inplace=True)
(12): QuantizedConv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), scale=0.5260586738586426, zero_point=139, p
adding=(1, 1))
(13): QuantizedReLU(inplace=True)
(14): QuantizedConv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), scale=0.6772246956825256, zero_point=132, p
adding=(1, 1))
(15): QuantizedReLU(inplace=True)
(16): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
(17): QuantizedConv2d(256, 512, kernel_size=(3, 3), stride=(1, 1), scale=0.7331007719039917, zero_point=140, p
adding=(1, 1))
(18): QuantizedReLU(inplace=True)
(19): QuantizedConv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), scale=0.5345668196678162, zero_point=156, p
adding=(1, 1))
(20): QuantizedReLU(inplace=True)
(21): QuantizedConv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), scale=0.41019582748413086, zero_point=155,
padding=(1, 1))
(22): QuantizedReLU(inplace=True)
(23): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
(24): QuantizedConv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), scale=0.33723706007003784, zero_point=144,
padding=(1, 1))
(25): QuantizedReLU(inplace=True)
(26): QuantizedConv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), scale=0.2690058946609497, zero_point=152, p
adding=(1, 1))
(27): QuantizedReLU(inplace=True)
(28): QuantizedConv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), scale=0.20182594656944275, zero_point=158,
padding=(1, 1))
(29): QuantizedReLU(inplace=True)
(30): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
)
(avgpool): AdaptiveAvgPool2d(output_size=(7, 7))
(classifier): Sequential(
(0): QuantizedLinear(in_features=25088, out_features=4096, scale=0.10471174865961075, zero_point=164, qscheme=
torch.per_tensor_affine)
(1): QuantizedReLU(inplace=True)
(2): Dropout(p=0.5, inplace=False)
(3): QuantizedLinear(in_features=4096, out_features=4096, scale=0.06953950971364975, zero_point=138, qscheme=t
orch.per_tensor_affine)
(4): QuantizedReLU(inplace=True)
(5): Dropout(p=0.5, inplace=False)
(6): QuantizedLinear(in_features=4096, out_features=1000, scale=0.1511237919330597, zero_point=60, qscheme=tor
ch.per_tensor_affine)
)
(quant): Quantize(scale=tensor([0.0186]), zero_point=tensor([114]), dtype=torch.quint8)
(dequant): DeQuantize()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.