How can I see the architecture of a neural network

Hello, I have been searching for some hours how to print the architecture of a neural network and I couldn’t find any function.

For example, I want to have a output like this for a linear neural network with 8 inputs 16 units in the hidden layer and 1 in the output: Linear 8, Linear 16, Linear 1

Is there any function or do I have to do it manually?

Thank you:)