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.


#4

Try this script from szagoruyko


#5

There’s also a summary view of a model in the works: https://github.com/pytorch/pytorch/issues/2001


#6

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