I try to make predictions for a 4-class classification project in C++ side using libtorch 1.4. However, I cannot obtain same predictions compared to Python side. Firstly, I obtain same input tensor values just before prediction. When I compare the output tensor values, I noticed that they are different. You can find those values in that picture:
Output_tensor_values_Python_and_C++1883×861 114 KB
Left side includes Python output tensor values and the prediction results for each input picture.
Right side includes C++ output tensor values and the prediction results for each input picture.
Could you offer a solution to obtain same output tensor values and prediction results?