Function failed in example 1. Review the axis variable you are passing. It must be set to the last axis, but must be generalizable. What is the index that represents the last axis in general?
The testing code block gave a report like this. But the axis =-1 was already set in the notebook. Why?
1 Like
@mejiroalbon
Yes the axis=-1 is already mentioned but this test report is trying to point out that when you created the log probability to the prediction list, it is asking you to mention it’s index positioning for prediction list.
There is 2-point hint given which mentions
To convert the target into the same dimension as the predictions tensor use tf.one_hot with target and preds.shape[-1].
So if you have not mentioned preds.shape[-1], the generalization issue is occurring as axis is already pointing to -1