def METHOD_NAME(self):
    seed = 1
    np.random.seed(seed)
    paddle.static.default_main_program().random_seed = seed
    paddle.static.default_startup_program().random_seed = seed
    _logger.info("create the fp32 model")
    fp32_lenet = ImperativeLenet()
    _logger.info("prepare data")
    batch_size = 64
    transform = paddle.vision.transforms.Compose([
        paddle.vision.transforms.Transpose(),
        paddle.vision.transforms.Normalize([127.5], [127.5])
    ])
    train_dataset = paddle.vision.datasets.MNIST(
        mode='train', backend='cv2', transform=transform)
    val_dataset = paddle.vision.datasets.MNIST(
        mode='test', backend='cv2', transform=transform)
    place = paddle.CUDAPlace(0) \
        if paddle.is_compiled_with_cuda() else paddle.CPUPlace()
    train_reader = paddle.io.DataLoader(
        train_dataset,
        drop_last=True,
        places=place,
        batch_size=batch_size,
        return_list=True)
    test_reader = paddle.io.DataLoader(
        val_dataset, places=place, batch_size=batch_size, return_list=True)
    _logger.info("train the fp32 model")
    self.model_train(fp32_lenet, train_reader)
    _logger.info("test fp32 model")
    fp32_top1, fp32_top5 = self.model_test(fp32_lenet, test_reader)
    _logger.info("quantize the fp32 model")
    quanter = PTQ()
    quant_lenet = quanter.quantize(fp32_lenet, fuse=True)
    _logger.info("calibrate")
    self.calibrate(quant_lenet, test_reader)
    _logger.info("save and test the quantized model")
    save_path = "./tmp/model"
    input_spec = paddle.static.InputSpec(
        shape=[None, 1, 28, 28], dtype='float32')
    quanter.save_quantized_model(
        quant_lenet, save_path, input_spec=[input_spec])
    quant_top1, quant_top5 = self.model_test(quant_lenet, test_reader)
    _logger.info("FP32 acc: top1: {}, top5: {}".format(fp32_top1,
                                                       fp32_top5))
    _logger.info("Int acc: top1: {}, top5: {}".format(quant_top1,
                                                      quant_top5))
    diff = 0.002
    self.assertTrue(
        fp32_top1 - quant_top1 < diff,
        msg="The acc of quant model is too lower than fp32 model")