Hello, I’m currently working on the W4 assignment and there’re some things I’m not clear about. It’s a sign language hand gesture recognition for alphabets. So, naturally, I thought the output of the last layer should be 26. As it was also the expected output.
However, inside the train and validation folders, there aren’t folders for the alphabets ‘J’ and ‘Z’. So, I change the last layer output to 24.
But no matter what I do, I’m getting following errors with both 24 and 26 outputs. I’ve also tried tweaking with other loss and optimizers, but no help.
Your model is not compatible with the dataset you defined earlier. Check that the loss function, last layer and label_mode are compatible with one another.
ValueError: Argument
output
must have rank (ndim)target.ndim - 1
. Received: target.shape=(None, 24), output.shape=(None, 26)
I don’t know what I’m missing. Any help is appreciated. Thanks!
Additional Info:
The skeleton code for def train_val_datasets() didn’t contain option for label_mode, but I added it with ‘categorical’ as value.