An unhandled exceptionMicrosoft C ++ exception: c10 :: Error at memory location

Please check the following things:

  1. All the DLLs in LibTorch are copied to the directory of the executable.
  2. You are not mixing the usage of different configurations.
  3. Make sure the module is saved when it is on CPU, not GPU.