W3 c2 tenserflow

We can’t see all of your code, but for starters you have used a different loss function. They specifically told you to use categorical_crossentropy in the instructions, but you have used binary_crossentropy. There are 6 classes here, right?

There are several other things in the instructions that you need to pay attention to. Note the point about the shapes of the expected inputs. Also note that the output of the forward propagation is just the linear activation value (“logits”) and not the activation output. So you will also need to use the from_logits parameter to the loss function to tell it to include the softmax calculation as part of the loss.

3 Likes