Please check thr following things:

Are you mixing the Debug and Release configuration?
Have you copied all the DLLs in LibTorch to the location of your executable?
Have you moved the model to the desired device before calculation?

btw, which version of libtorch are you using?