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.

TripletLoss will produce only NaN when using mixed bfloat16 precision #364

Description

@kbelenky

If you use the TripletLoss loss function with mixed bfloat16 precision:

mixed_precision.set_global_policy('mixed_bfloat16')

As described here:
https://www.tensorflow.org/guide/mixed_precision#setting_the_dtype_policy

Then the value for the loss will only ever be NaN.

The expected behavior is for the loss value to be a non-NaN value.

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