How do you use Pytorch model's function to get output instead of model.forward() function #12073
Unanswered
deshwalmahesh
asked this question in
Other Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
TL;DR: How can I use
model.whatever_function(input)
instead ofmodel.forward(input)
for theonnx / onnxruntime
?I use CLIP embedding to create embedding for my Image and texts as:
Code is from the official git merge
and it works fine giving me
[Batch, 1024]
tensors for both for the loaded model.Now I have quantized my model in
Onnx
as:and the model is saved.
When I test the model as :
It gives me a list of length 2, one for each image and text and the
result[0]
has shape of[Batch,2]
.Beta Was this translation helpful? Give feedback.
All reactions