1. The image reading
The results of the image opencv python and c ++ read inconsistent, because the python and c ++ opencv version employed is not the same, so that the use of different decoding library, reading different results.
Details Reference: https://www.cnblogs.com/haiyang21/p/11655404.html
2. The image transformation
PIL and pytorch image resize operation, and resize opencv results are not the same , this will lead to training using PIL, using opencv predicting the results vary widely, especially in the detection and segmentation tasks more obvious.
3. Numerical Calculation
exp is calculated pytorch torch.exp and c ++, and when the value of 10e-6 to 10e-3 error will be, for the precision calculation requires special attention, such as
Two input 5. The 601 597 , 5.601601 , after calculation becomes exp 270. 85,862,343,143,174 , 270.85970686809225