I haven’t executed the notebook, but if top_class has the shape [64, 64], your view operation will return the same shape as the current implementation in the notebook.
Also, using the shape of top_class seems to take into consideration use cases with another number of classes.
Please correct me, if I misunderstood something.