YodaEmbedding / keras2tikz

Generate tikz code for DNN layer diagrams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

keras2tikz

Generate (hopefully) readable tikz code for DNN layer diagrams.

Tested on keras 2.3.1.

Why?

Keras has a summary and a builtin graphviz export. Both show the input and output shapes of all layers. However, many papers show the layer parameters, so I've added some common parameters like hidden units (Dense + Recurrent), Kernel size and number of filter (Convolutional), Pooling Dimensions... to the output graph...

Usage

from keras import applications

model = applications.VGG16(weights=None)
tix_code = gen_tikz_from_model(model)
tex_file = open("model.tex", 'w')
tex_file.write(tex_file)
tex_file.close()

vgg16

About

Generate tikz code for DNN layer diagrams

License:MIT License


Languages

Language:Python 100.0%