add_custom_metric
code_loader.leap_binder.add_custom_metric(
function=Callable[..., tf.Tensor],
name=str
)Args
Examples
Basic Usage
import tensorflow as tf
def custom_metric_mean_distance(y_true, y_pred):
rank = len(y_true.shape)
axis = range(1, rank)
diff = y_true - y_pred
return tf.reduce_mean(diff, axis=axis)
leap_binder.add_custom_metric(custom_metric_mean_distance, "mean distance")Last updated
Was this helpful?

