Hello Team,

I am stuck at week1, assignment 3

For weighted loss function i am trying below code

```
for i in range(len(pos_weights)):
# for each class, add average weighted loss for that class
y_pred+=epsilon
p_loss = pos_weights*(y_true)*tf.keras.backend.log(y_pred)
n_loss = neg_weights*(1-y_true)*tf.keras.backend.log(1-y_pred)
loss += -1*tf.keras.backend.mean((p_loss+ n_loss)) #complete this line
return loss
```

However, when i run the code i am getting

```
L(y_pred_1) = nan
L(y_pred_2) = nan
Difference: L(y_pred_1) - L(y_pred_2) = nan
```

Not sure whats wrong. i can understand if values are wrong but not sure why i am getting it as nan ( not a number)

any pointers to resolve the issue are appreciated.

Thank you !

Aditya