I am trying to load a resnet34 model which was trained and saved on my laptop (with pytorch) . I copied the the .pkl (pickle) file and .pth (pytorch model) files from my laptop to jetson nano. Now I ran my code which would implement these models . But the code ran very slow . I think the model loading would have taken so much time. It took more than a minute to detect and give me the output. My question is can i use tensorrt to optimize my model? if so how as I already have my .pth file ready , so i think i dont have to retrain my model in jetson nano as that would be tedious , please help!!!
NOTE: what exactly I did was in my laptop collected various environmental sound dataset and converted them into spectogram and trained those spectograms in my laptop using pytorch after which i got my .pkl and .pth files.