Additional layer in the conv weight after quantization

key_encoder = KeyEncoder()
key_checkpoint = torch.load(‘saves/key.pth’, map_location=‘cpu’)
key_encoder.qconfig = key_checkpoint[‘qconfig’]
key_encoder = prepare(key_encoder)
key_encoder = convert(key_encoder, inplace=True)
key_encoder.load_state_dict(key_checkpoint[‘model_state_dict’])

I first quantized the model and then saved it and after again loading it is showing the below error.
RuntimeError: [QConv2D Given groups=1, weight of the size 64, 7, 7, 4, expected input (NCHW) 1, 3, 480, 864 to have 4 channels, but got 3 channels