mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #263] How do I use model.encode_image() function in Onnx to get output instead of using default model.forward() function #229
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openai/CLIP#229
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @deshwalmahesh on GitHub (Jul 2, 2022).
Original GitHub issue: https://github.com/openai/CLIP/issues/263
I have quantized the model using your official snippet from the merge request and it working great. Now I want
CLIPfor encoding images and texts than classification. How can I do that?Below is the code to quantize and predict:
and it works fine giving me
[Batch, 1024]tensors for both for the loaded model.Now I have quantized my model in
Onnxas: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].