As far as I understand the notebook, broadcasting should not be used:

To get the equality to work out the way we want, top_class and labels must have the same shape.
If we do
equals = top_class == labels
equals will have shape (64, 64) , try it yourself. What it’s doing is comparing the one element in each row of top_class with each element in labels which returns 64 True/False boolean values for each row.

So this behavior is not desired, but instead each element of top_class should be compared to only the corresponding element in labels.