Towards Data Science, Artificial Intelligence, TensorFlow, Machine Learning, Deep Learning.
(0.5 * self.threshold)) return tf.where(is_small_error, small_error_loss, big_error_loss) MyHuberLoss is the class name. After the class name, we inherit the parent class ‘Loss’ from tensorflow.keras.losses. So MyHuberLoss inherits as Loss. This allows us to use MyHuberLoss as a loss function.