Load Pytorch Model Weights in Python Backend #6108
-
Hey, I have a model deployed as python backend and was wondering if and how I can suply additional files like a model.pth with that python backend? One way to solve this would be to deploy the model as e.g. ONNX but that comes with some extra work of seperating out the pre-/post-processing and combining the steps. |
Beta Was this translation helpful? Give feedback.
Answered by
hasnainkothawala
Aug 8, 2023
Replies: 1 comment
-
Not sure if I understand you correctly but this how i did it , I wrote this in my model.py
And added the model.pth file in the same location : |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
dyastremsky
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure if I understand you correctly but this how i did it ,
I wrote this in my model.py
And added the model.pth file in the same location :