So i trained resnet18 on a dataset in python and got 100% accuracy i made an infrence code in python and c++ using libtorch both libtorch and pytorch are same versions on windows.
They both used jit.load and loaded sucessfully and the input matrix in the forward pass for both were identical for the same image i even enusred the subtle floating point was exactly the same however in libtorch before the soft max the output is thousands and introduces wrong classifications as a result and the output in pytorch is 5. Smth.
Please note that this is not an issue with preprocessing or data collection since the input matrix and library versions between the two are 2.1.2 both python and cpp additionally the outputs collected are also in the same shape.