Skip to content

Custom loss usage by name: not working in V3 but worked in V2 #20112

@shkarupa-alex

Description

@shkarupa-alex

Default use case for custom loss in V2 (for me) was:

  1. Register custom loss with register_keras_serializable
  2. Use it in model compile by name compile(loss="MyPackage>MyLoss")

This worked in Keras V2, but not working in Keras V3. Here is a simple test https://colab.research.google.com/drive/1R3z3fFhV7NN1Oa_HJYp60LsneoxjOlvj?usp=sharing

Metadata

Metadata

Assignees

Labels

type:supportUser is asking for help / asking an implementation question. Stackoverflow would be better suited.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions