InvalidArgumentError various model fit code tried

For a multi-class classification problem, you can use categorical cross entropy when the true labels are one-hot encoded. If the true labels are not one-hot encoded, use the sparse version of the loss function.

Not getting the desired accuracy means that you’ll have to change the model architecture. We’ve had a similar discussion in the recent past. Here’s the topic. Do see this link on underfitting and overfitting

If that doesn’t help, please click my name and message your notebook as an attachment.

1 Like