Skip to contents

Allows users to register a custom metric function so it can be used by name within kerasnip model specifications.

Usage

register_keras_metric(name, metric_fn)

Arguments

name

The name to register the metric under (character).

metric_fn

The metric function.

Value

No return value, called for side effects.

Details

Registered metrics are stored in an internal environment. When a model is compiled, kerasnip will first check this internal registry for a metric matching the provided name before checking the keras3 package.