Towards Data Science, Artificial Intelligence, TensorFlow, Machine Learning, Deep Learning.
model compilation. model.compile(optimizer='sgd', loss=my_huber_loss_with_threshold(threshold=1.5)) Huber Loss using Classes (OOP) import tensorflow as tf from tensorflow.keras.losses import Loss class MyHuberLoss(Loss): #inherit parent class #class attribute threshold = 1 #initialize instance