https://github.com/faroit/keras2tikz
Generate tikz code for DNN layer diagrams
https://github.com/faroit/keras2tikz
Last synced: about 1 month ago
JSON representation
Generate tikz code for DNN layer diagrams
- Host: GitHub
- URL: https://github.com/faroit/keras2tikz
- Owner: faroit
- License: mit
- Created: 2017-05-28T22:19:05.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-03-24T13:13:38.000Z (about 6 years ago)
- Last Synced: 2025-03-22T22:45:52.034Z (about 1 year ago)
- Language: Python
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/fchollet/keras/blob/master/keras/utils/vis_utils.py). 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
```python
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()
```
