Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

tfa.losses.TripletSemiHardLoss() replacement? #370

Description

@mfide

Hello,

I was using triplet loss function from tensorflow_addons.losses.TripletSemiHardLoss(margin=1.0) to train my model using following line:

tsn.compile(optimizer=tf.keras.optimizers.Adam(0.0001), loss=tfa.losses.TripletSemiHardLoss(margin=1.0))

Any example or idea how to replace this loss function with tripletloss in tensorflow_similarity.losses?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions