You can generate a graph representation of the network using something like visualize 1.3k, as illustrated in this notebook 1.6k.
For printing the sizes, you can manually add a print(output.size()) statement after each operation in your code, and it will print the size for you.