fix weighted cross entropy
" loss = 0\n",
" for i in range(y_pred.shape[-1]):\n",
" loss += custom_weights[i] * tf.keras.losses.binary_crossentropy(\n",
- " y_true, y_pred, from_logits=True, label_smoothing=10\n",
+ " y_true[:,:,:,i], y_pred[:,:,:,i], from_logits=True, label_smoothing=10\n",
" )\n",
" \n",
" return loss"
