ivy icon indicating copy to clipboard operation
ivy copied to clipboard

Update losses.py

Open BhumikaChauhan07 opened this issue 2 years ago • 0 comments

Updated ivy/ functional/ ivy/ experimental/ losses.py with the inclusion of "triplet_margin_loss".

PR Description

Changes Made

Added a new function triplet_margin_loss to the ivy library, which computes the triplet margin loss. This loss is commonly used in triplet loss scenarios, such as in siamese networks for learning embeddings.

Purpose

The purpose of this addition is to provide users with a convenient and efficient way to compute triplet margin loss, allowing for better support of applications involving metric learning and similarity-based tasks.

Related Issue

Closes #27204

Checklist

  • [X] Did you add a function?
  • [ ] Did you add the tests?
  • [ ] Did you run your tests and are your tests passing?
  • [ ] Did pre-commit not fail on any check?
  • [ ] Did you follow the steps we provided?

BhumikaChauhan07 avatar Dec 26 '23 18:12 BhumikaChauhan07