[GH-ISSUE #312] BC-breaking pytorch 1.9 vs 1.7.1 in multi_head_attention_forward #269

Closed
opened 2026-10-31 21:13:13 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @Zhaoyi-Yan on GitHub (Jan 18, 2023).
Original GitHub issue: https://github.com/openai/CLIP/issues/312

https://github.com/pytorch/pytorch/blob/v1.7.1/torch/nn/functional.py#L4222

https://github.com/pytorch/pytorch/blob/v1.9.0/torch/nn/functional.py#L4836

I cannot find scaling in pytorch 1.9, it seems has been removed. So, maybe First, [install PyTorch 1.7.1](https://pytorch.org/get-started/locally/) (or later) and torchvision is not correct.

Originally created by @Zhaoyi-Yan on GitHub (Jan 18, 2023). Original GitHub issue: https://github.com/openai/CLIP/issues/312 https://github.com/pytorch/pytorch/blob/v1.7.1/torch/nn/functional.py#L4222 https://github.com/pytorch/pytorch/blob/v1.9.0/torch/nn/functional.py#L4836 I cannot find `scaling` in pytorch 1.9, it seems has been removed. So, maybe `First, [install PyTorch 1.7.1](https://pytorch.org/get-started/locally/) (or later) and torchvision` is not correct.
Author
Owner

@jongwook commented on GitHub (Jan 18, 2023):

It appears that they refactored the implementation, and the scaling part is now in:

https://github.com/pytorch/pytorch/blob/v1.9.0/torch/nn/functional.py#L4823

<!-- gh-comment-id:1387493368 --> @jongwook commented on GitHub (Jan 18, 2023): It appears that they refactored the implementation, and the scaling part is now in: https://github.com/pytorch/pytorch/blob/v1.9.0/torch/nn/functional.py#L4823
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openai/CLIP#269
No description provided.