Libtorch model inference

Hi, I am trying to load do inference in libtorch, but it gives me Segmentation fault (core dumped) after I pass the model predicts the outputs. I am using the example code and I am not sure why is it happening?

you can find the here:

Could you also provide your model definition code and how you export your model?

Model Defination code :

I converted the model to Torch Script via tracing as shown in the tutorial

The debugger output:

Thread 1 “example-app” received signal SIGSEGV, Segmentation fault.
0x00007ffff608d9fe in ?? () from /usr/local/cuda-10.0/lib64/

I am still not sure what is the problem here. The model is doping the prediction but giving seg fault after.