Giter VIP home page Giter VIP logo

dnnsvg's Introduction

MIT licensed

dnnsvg

NNSVG inspired network structure drawer for deep learning

How to use

Sample code

dnnsvg has intuitive interface which enables building svgs for common neural network architecture

svg = SVGBuilder(height=height, width=width) \
    .add_layer(Convolution2D(in_channels=None, out_channels=96, ksize=11, stride=4)) \
    .add_layer(MaxPooling(ksize=3, stride=2)) \
    .add_layer(Convolution2D(in_channels=96, out_channels=256, ksize=5, stride=1, pad=2)) \
    .add_layer(MaxPooling(ksize=3, stride=2)) \
    .add_layer(Convolution2D(in_channels=256, out_channels=384, ksize=3, stride=1, pad=1)) \
    .add_layer(Convolution2D(in_channels=384, out_channels=384, ksize=3, stride=1, pad=1)) \
    .add_layer(Convolution2D(in_channels=384, out_channels=256, ksize=3, stride=1, pad=1)) \
    .add_layer(MaxPooling(ksize=3, stride=2)) \
    .add_layer(Reshape(output_shape=(1, 9216))) \
    .add_layer(FullyConnected(output_shape=(1, 4096))) \
    .add_layer(FullyConnected(output_shape=(1, 4096))) \
    .add_layer(FullyConnected(output_shape=(1, 1000))) \
    .build(input_tensor)

Sample svg

Alexnet svg sample

To install the package

python setup.py install

or if you prefer using pip

pip install .

When developing the package

It is recommended to use develop instead of install option to reflect changes in the directory

python setup.py develop

or if you prefer using pip

pip install -e .

dnnsvg's People

Contributors

yuishihara avatar

Stargazers

Pankaj Kumar avatar Shay Ronen avatar James Guillochon avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

gmuraleekrishna

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.