from IPython.display import SVG from keras.utils.vis_utils import model_to_dot SVG(model_to_dot(ann, show_shapes = True ).create(prog='dot', format='svg'))