I am trying to implement a custom metric in Keras when building a model with the goal of monitoring it during training. So, to give you an idea, in my script I first load