ADaSci Banner 2024

Creating Neural Network Architecture Drawings with NN-SVG

NN-SVG is a powerful tool for creating parametric Neural Network architecture drawings, allowing easy export to SVG files for academic papers and web use.

Neural Network architecture drawings are essential for illustrating the design and functionality of models in research papers and presentations. Traditionally, creating these diagrams has been a manual and time-consuming task. However, NN-SVG offers a powerful tool that allows users to generate these drawings parametrically, saving time and effort while providing high-quality, scalable vector graphics (SVG) suitable for academic use.

Introduction to NN-SVG

NN-SVG is an open-source tool designed to create detailed and publication-ready diagrams of Neural Network (NN) architectures. The tool supports generating figures for Fully-Connected Neural Networks (FCNN), Convolutional Neural Networks (CNN), and Deep Neural Networks (DNN) like those introduced in the AlexNet paper. The tool leverages the D3.js library for FCNN and CNN figures and Three.js for AlexNet-style DNN figures.

Key Features:

  • Parametric Design: Create NN diagrams by specifying parameters rather than drawing manually.
  • SVG Export: Export diagrams as SVG files, ensuring scalability and compatibility with academic papers and web pages.
  • Customization: Adjust size, color, and layout to match your preferences or publication requirements.

Getting Started

To use NN-SVG, follow these steps:

  1. Visit the NN-SVG Website: Access the tool directly from alexlenail.me/NN-SVG.
  2. Select the Type of Network: Choose between FCNN, CNN, or AlexNet-style DNN from the available options.
  3. Configure the Parameters: Adjust the network parameters such as the number of layers, nodes per layer, and other specific settings. Each type of network will have different configurable parameters.
  4. Generate the Diagram: Once you’ve configured the parameters, generate the diagram.
  5. Export to SVG: After generating the diagram, export it as an SVG file for use in your documents or presentations.

Example: Creating a Fully-Connected Neural Network Diagram

Here is a step-by-step guide to creating a Fully-Connected Neural Network (FCNN) diagram using NN-SVG:

Step 1: Select FCNN

Navigate to the NN-SVG tool and select the FCNN option.

Step 2: Configure Network Parameters

Input the desired parameters for your FCNN. For example:

  • Input Layer: 10 nodes
  • Hidden Layers: 3 layers with 20, 15, and 10 nodes respectively
  • Output Layer: 5 nodes

Adjust additional parameters such as layer spacing and node size as needed.

Step 3: Generate the Diagram

Click the “Generate” button to create the FCNN diagram based on your specified parameters.

Step 4: Export the Diagram

Once the diagram is generated, click the “Export” button to save the diagram as an SVG file.

Example: Creating a Convolutional Neural Network Diagram

Here is a step-by-step guide to creating a Convolutional Neural Network (CNN) diagram using NN-SVG:

Step 1: Select CNN

Navigate to the NN-SVG tool and select the CNN option.

Step 2: Configure Network Parameters

Input the desired parameters for your CNN. For example:

  • Input Layer: 32x32x3 (image size and channels)
  • Convolutional Layers: Specify the number of filters, kernel size, and stride for each layer
  • Pooling Layers: Define the pooling operations (e.g., max-pooling) between convolutional layers
  • Fully-Connected Layers: Add fully-connected layers after the convolutional and pooling layers

Step 3: Generate the Diagram

Click the “Generate” button to create the CNN diagram based on your specified parameters.

Step 4: Export the Diagram

Once the diagram is generated, click the “Export” button to save the diagram as an SVG file.

Conclusion

NN-SVG simplifies the process of creating and exporting neural network architecture diagrams. By allowing parametric configurations and providing SVG export options, it saves time and enhances the quality of illustrations for academic and professional use. Whether you are designing a simple FCNN or a complex CNN, NN-SVG offers a user-friendly interface and powerful customization options to meet your needs.

For more information and to start using NN-SVG, visit the official NN-SVG website. This tool is invaluable for anyone involved in machine learning research or education, providing a quick and efficient way to create high-quality network diagrams.

References

Picture of Association of Data Scientists

Association of Data Scientists

The Chartered Data Scientist Designation

Achieve the highest distinction in the data science profession.

Elevate Your Team's AI Skills with our Proven Training Programs

Strengthen Critical AI Skills with Trusted Generative AI Training by Association of Data Scientists.

Our Accreditations

Get global recognition for AI skills

Chartered Data Scientist (CDS™)

The highest distinction in the data science profession. Not just earn a charter, but use it as a designation.

Certified Data Scientist - Associate Level

Global recognition of data science skills at the beginner level.

Certified Generative AI Engineer

An upskilling-linked certification initiative designed to recognize talent in generative AI and large language models

Join thousands of members and receive all benefits.

Become Our Member

We offer both Individual & Institutional Membership.