GPU Coder in Matlab

Hello all,
I wrote Matlab code to train a network.
Now I want to publish it on Jetson Nano.
I want to use GPU Coder but I can’t use my Matlab script, so I have to convert my code into a function.
When I run my code, I get net.mat (net pre-trained) as an array, so my question is, what should I convert into a function, my matlab script or net.mat??
Can anyone help me to do this? I don’t understand GPU Coder very well

Thank you very much!