Hi,
I found the problem in the above implementation. In the CPP version, I was not clamping the values after doing denormalisation. I have put a clamping function and now it is working as expected.
The edit part if anyone stumbles on the same problem is below:
tensor = tensor.mul(0.5).add(0.5).mul(255.0); -- > tensor = tensor.mul(0.5).add(0.5).mul(255.0).clamp(0, 255);

Without clamping it as causing overflow in brighter regions of the image.
Is there a better way of comparing Tensor output from Python and C++?
Currently I was checking the correctness like a caveman 
Checking via printing it out.
Best regards
Apurv