Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isosnovik/nets
Draw your net
https://github.com/isosnovik/nets
architecture deep-learning draw keras neural-network segmentation visualization
Last synced: 4 days ago
JSON representation
Draw your net
- Host: GitHub
- URL: https://github.com/isosnovik/nets
- Owner: ISosnovik
- Created: 2016-12-26T17:05:46.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-01T19:22:40.000Z (about 7 years ago)
- Last Synced: 2024-08-04T03:11:09.519Z (3 months ago)
- Topics: architecture, deep-learning, draw, keras, neural-network, segmentation, visualization
- Language: Python
- Homepage:
- Size: 56.6 KB
- Stars: 48
- Watchers: 4
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nets
It is an easy-to-use framework for drawing your favorite network's architecture.
It is inspired by the juicy schemas from [SegNet](http://mi.eng.cam.ac.uk/projects/segnet/)## Usage
The API is close to this of [Keras](https://keras.io/getting-started/sequential-model-guide/)You don't have to think about filter size, strides and activation function. It is all about shapes, colors and fonts.
```python
from nets.PlaneLayer import *
from nets.neural_net import NNnn = NN()
# Encoder
nn.add(Conv2D())
nn.add(Conv2D())
nn.add(Pooling(pool_size=2))nn.add(Conv2D())
nn.add(Conv2D())
nn.add(Pooling(pool_size=2))nn.add(Conv2D())
nn.add(Conv2D())
nn.add(Conv2D())
nn.add(Pooling(pool_size=2))# Decoder
nn.add(Upsampling(factor=2))
nn.add(Conv2D())
nn.add(Conv2D())
nn.add(Conv2D())nn.add(Upsampling(factor=2))
nn.add(Conv2D())
nn.add(Conv2D())nn.add(Upsampling(factor=2))
nn.add(Conv2D())
nn.add(Conv2D())nn.add(Conv2D())
```To draw the net, the architecture should be processed
```python
nn.compile()
nn.add_legend(bbox_to_anchor=(0.2, -0.1, 0.6, 0.1), fontsize=26)
nn.draw()
```Pretty simple. That's it
![img](src/net.png)