waleedka / hiddenlayer

Neural network graphs and training metrics for PyTorch, Tensorflow, and Keras.
MIT License
1.79k stars 266 forks source link

Save network plot to file #31

Open erap129 opened 5 years ago

erap129 commented 5 years ago

Hello,

I saw there is a possibility to save training stat plots into png files, but I couldn't find an option to save the actual NN architecture plot into a file, is this currently possible?

Thanks

mdhasanai commented 5 years ago

To do this, first, save the picture(output) in a variable

im = hl.build_graph(model_name, torch.zeros([64,3,7,7]))

(your size in place of torch.zeros([64,3,7,7])

Then save it giving the path with a name of the file (you want), also adding format of the file at the beginning

im.save(path="path_of_file/name_of_file" , format="jpg")

ldbro0 commented 4 years ago

Is there a way you can change the figure size or resolution?

daniel347x commented 3 years ago

Thanks for this fantastic library.

It would be fabulous indeed if the above information could make it onto the home page. Thanks!