code: def test_qat_resnet_per_channel(self):
      # Quantize ResNet50 model
      x = torch.randn(BATCH_SIZE, 3, 224, 224).fill_(1.0)
      qat_resnet50 = resnet50()
  
      qat_resnet50.qconfig = quantization.QConfig(
          activation=quantization.default_fake_quant,
          weight=quantization.default_per_channel_weight_fake_quant,
      )
      quantization.prepare_qat(qat_resnet50, inplace=True)
      qat_resnet50.apply(torch.ao.quantization.enable_observer)
      qat_resnet50.apply(torch.ao.quantization.enable_fake_quant)
  
      _ = qat_resnet50(x)
      for module in qat_resnet50.modules():
          if isinstance(module, quantization.FakeQuantize):
              module.calculate_qparams()
      qat_resnet50.apply(torch.ao.quantization.disable_observer)
  
      self.exportTest(toC(qat_resnet50), toC(x))
  
imports: import unittest
  import pytorch_test_common
  import torch
  from model_defs.dcgan import _netD, _netG, bsz, imgsz, nz, weights_init
  from model_defs.emb_seq import EmbeddingNetwork1, EmbeddingNetwork2
  from model_defs.mnist import MNIST
  from model_defs.op_test import ConcatNet, DummyNet, FakeQuantNet, PermuteNet, PReluNet
  from model_defs.squeezenet import SqueezeNet
  from model_defs.srresnet import SRResNet
  from model_defs.super_resolution import SuperResolutionNet
  from pytorch_test_common import skipIfUnsupportedMinOpsetVersion, skipScriptTest
  from torch.ao import quantization
  from torch.autograd import Variable
  from torch.onnx import OperatorExportTypes
  from torch.testing._internal import common_utils
  from torch.testing._internal.common_utils import skipIfNoLapack
  from torchvision.models import shufflenet_v2_x1_0
  from torchvision.models.alexnet import alexnet
  from torchvision.models.densenet import densenet121
  from torchvision.models.googlenet import googlenet
  from torchvision.models.inception import inception_v3
  from torchvision.models.mnasnet import mnasnet1_0
  from torchvision.models.mobilenet import mobilenet_v2
  from torchvision.models.resnet import resnet50
  from torchvision.models.segmentation import deeplabv3_resnet101, fcn_resnet101
  from torchvision.models.vgg import vgg16, vgg16_bn, vgg19, vgg19_bn
  from torchvision.models.video import mc3_18, r2plus1d_18, r3d_18
  from verify import verify
label_desc: Use image node_id 24 for calling the TestModels obj's underlying member method code with example usage: obj.test_qat_resnet_per_channel() without return types