How to save tw.draw_model to image file
I can only run my model on server, so I can't see the model graph directly from the example code: tw.draw_model. So, anyone can tell me how to save the graph data to image file? Thanks.
The result of tw.draw_model is a object of DotWrapper Calss. You can save tw.draw_model to image file as follow:
img = tw.draw_model(model, [1, 3, 224, 224]) # list cantains the size of input tensor img.save(filename)
I find the method help info by help(tw.draw_model)
draw_model(model, input_shape=None, orientation='TB', png_filename=None)
after running this code
tw.draw_model(model, [1, 3, 224, 224], 'model.png')
nothing was saved
using img.save, the png resolution is too low to see the model graph