mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #222] clip output is NaN #193
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#193
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 @chinoll on GitHub (Mar 7, 2022).
Original GitHub issue: https://github.com/openai/CLIP/issues/222
My CLIP will output NaN when using CUDA, but it will output normally when using CPU. How to solve this problem?
output
CLIP can output the probability normally when using CPU.
@chinoll commented on GitHub (Mar 7, 2022):
torch version:1.10.2
cuda version:11.4
OS:Windows 10
python version:3.9.5
@illtellyoulater commented on GitHub (Mar 19, 2022):
same problem here, did you manage to fix it?
@chinoll commented on GitHub (Mar 19, 2022):
Are you talking about getting the model to produce the correct output? Using model.float() will make the model produce the correct output, but I want to use float16 and the model does not work properly when the input data is in the format float16.
@illtellyoulater commented on GitHub (Mar 29, 2022):
@chinoll yeah I also wanted to make it work with the GPU (and float16)... and I think I've fixed this by using a different version of cuda toolkit.
Try uninstalling torch & torchvision and then install them again with
pip3 install torch==1.11.0+cu115 torchvision==0.12.0+cu115 -f https://download.pytorch.org/whl/torch_stable.html.If it doesn't work, again uninstall them and reinstall them with
pip install torch==1.10.1+cu102 torchvision==0.11.2+cu102 -f https://download.pytorch.org/whl/torch_stable.html.@SunZhigang7 commented on GitHub (Mar 31, 2022):
useful!! thanks
@chinoll commented on GitHub (Apr 7, 2022):
Great!