执行命令后,会在当前目录下生成resnet18.mlir, resnet18_in_f32.npz和resnet18_top_f32_all_origin_weight.npz等文件。 4.2.2.INT8量化模型¶ 使用run_calibration(run_calibration.py)工具得到量化需要的校准表,使用了100张来自ILSVRC2012的图片测试: ...
stride=stride,bias=False),nn.BatchNorm2d(outchannel))defforward(self,x):out=self.left(x)out+=self.shortcut(x)out=F.relu(out)returnoutclassResNet(nn.Module):def__init__(self,ResidualBlock,num_classes=10):super(ResNet,self).__init__()self.inchannel=64self.conv1=nn.Sequential(nn.Conv...