.params vs .pt #3655
Answered
by
frankfliu
DialingSpoon527
asked this question in
Q&A
.params vs .pt
#3655
-
How do I get a model to load from a
I did see this. I only repeat it because it's unanswered, ancient, and not in this category. |
Beta Was this translation helpful? Give feedback.
Answered by
frankfliu
Mar 29, 2025
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
DialingSpoon527
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.pt
file in DJL referring to torchscript file. You can use python to trace the pytorch model and save it as.pt
file.params
is DJL parameter file, it's saved by DJL training code. You have to use DJL Block to load the.params
file. Means, you need callModel.setBlock()
first.Model.load()
method expect a folder or a torchscript file (for PyTorch). The file name extension is only being used to detect the model file when a folder is specified.