Skip to content

Conversation

@jimlinntu
Copy link
Contributor

Adds torch.nn.functional.cosine_similarity Jax implementation

@jimlinntu jimlinntu force-pushed the add_cosine_similarity branch from a81821e to a596978 Compare October 23, 2024 21:14
@jimlinntu jimlinntu force-pushed the add_cosine_similarity branch from a596978 to 6577d8f Compare October 23, 2024 22:06
@qihqi qihqi self-requested a review October 23, 2024 23:00
# squeeze_ is expected to change tensor's shape. So replace with new value
torch.ops.aten.squeeze_: (torch.ops.aten.squeeze, True),
torch.ops.aten.clamp_: torch.ops.aten.clamp,
torch.ops.aten.clamp_min_: torch.ops.aten.clamp_min,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we want to add this op here?

Copy link
Collaborator

@ManfeiBai ManfeiBai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@qihqi qihqi merged commit c9e02e9 into pytorch:master Oct 30, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants