Solved by raghuramank100 in post #2 
              
              
                I think the problem is that you are not setting the qconfig for the model that is being passed to prepare: 
model.qconfig = torch.quantization.get_default_qconfig(backend)