Primary competition visual

Microsoft Rice Disease Classification Challenge

Helping Egypt
$3 000 USD
Completed (over 3 years ago)
Classification
Computer Vision
924 joined
260 active
Starti
May 13, 22
Closei
Aug 14, 22
Reveali
Aug 14, 22
User avatar
hark99
Self-employed
Log loss Evaluation Metric
Help Ā· 4 Aug 2022, 03:45 Ā· 0

I have created a custom log loss in Tensorflow. Though the below code is working but giving strange results like 80.06,75.04, etc

def log_loss_metric(y_true,y_pred):#,num_labels=3): y_true = tf.cast(y_true, 'int64') y_pred = tf.cast(y_pred, 'float64') y_true = tf.one_hot(y_true,depth=3,dtype='float64')# num_classes log_loss = (1/-(len(y_pred))) * (tf.reduce_sum(tf.multiply(y_true , tf.math.log(y_pred)))) #log_loss = tf.cast(log_loss,tf.float32) return log_loss

Discussion 0 answers