How to print a model after load it?

(Mata Fu) #1

It confused me because in torch you can directly print the loaded model. But in pytorch I just saw parameters inside.

(Simon Wang) #2

print(model) should just work.

(Mata Fu) #3

It looks like a dictionary in python and print can just show the key/value rather than the structure of net.


Try this script from szagoruyko


There’s also a summary view of a model in the works:


Nice! Didn’t know that. Seems to be quite useful :slight_smile: