Sign inSign up

as2528/neural-dashboard

By as2528

•Updated over 1 year ago

A No-Code dashboard for training Neural Networks

Image
Machine learning & AI
Data science
0

252

as2528/neural-dashboard repository overview

⁠Neural Dashboard

An interactive neural network visualizer and training playground.
Designed for fast prototyping and educational insights into how neural networks learn in real time.

This container runs a fully self-contained dashboard where you can:

  • Build custom neural networks visually (CNNs, FCNNs, etc.)
  • Train on image and tabular datasets
  • Visualize 2D loss curves and 3D loss landscapes (PCA-reduced)
  • Export trained models
  • Use CPU or GPU (CUDA supported)
  • Supports CSV, ZIP image folders (ImageFolder), and custom parameters

⁠How to Run

⁠Option 1 — From Docker Hub
docker pull as2528/neural-dashboard:latest
docker run --gpus all -p 7860:7860 as2528/neural-dashboard:latest

Open in your browser:

http://localhost:7860

⁠Option 2 — From Local .tar File

If you have the exported Docker image .tar:

docker load -i neural-dashboard.tar
docker run --gpus all -p 7860:7860 neural-dashboard:latest

Open in your browser:

http://localhost:7860

⁠Neural Network Dashboard Manual

This program is used to quickly prototype and deploy CNN and FCNN architectures.
It automatically uses the CUDA-capable GPU when available; if no GPU is found, it falls back to CPU.

The backend uses PyTorch to build and train neural networks.
The program is fully editable and should be easily extendable; you can easily add more layers if you want to extend it.


⁠Table of Contents


⁠Supported Layers & Parameters

Layer TypeInput Dimension (in_dim)Output Dimension (out_dim)Kernel SizePaddingStrideExtra ParametersDefaults
Conv2d✅ Required✅ RequiredOptionalOptionalOptionalbias (bool)kernel=3, padding=1, stride=1, bias=True
Linear✅ Required✅ Required––––None
Dropout✅ Probability (use in_dim)Same as in_dim––––0.5 (recommend specifying explicitly)
LeakyReLU✅ Use in_dim for slopeSame as in_dim–––negative_slope (float)negative_slope=0.01
ELU✅ Use in_dim for alphaSame as in_dim–––alpha (float)alpha=1.0
ReLU––––––No parameters
Tanh––––––No parameters
Sigmoid––––––No parameters
Flatten––––––No parameters
GELU––––––No parameters
Softmax–––––dim=1 (fixed)Hardcoded: dim=1
MaxPool2d––OptionalOptionalOptional–kernel=2, padding=0, stride=2
AvgPool2d––OptionalOptionalOptional–kernel=2, padding=0, stride=2

Notes:

  • in_dim and out_dim are mandatory for layers like Conv2d and Linear.
  • For Dropout, enter the probability into the in_dim field. (Example: 0.5 for 50% dropout.)
  • Layers like ReLU, Tanh, Sigmoid, Flatten, GELU, and Softmax have no user-configurable parameters (except Softmax, which uses dim=1 by default).
  • Pooling layers accept optional parameters but work well with defaults.

⁠Architecture Validation

If you build an invalid architecture, the program will stop before training begins.

You’ll see a ⚠️ icon next to the problematic layer in the UI.
You can then edit or delete the layer using the Edit Layer tab.


⁠CUDA Errors

If the program encounters a CUDA error:

  • The error will appear in the GPU section at the bottom of the UI.
  • OR, a warning will appear advising you to restart the app or kernel.

Note:

  • CUDA errors require a full kernel or app restart to clear.

⁠File Handling System

The app accepts CSV files for tabular data and ZIP files for image datasets.

⁠CSV Format

Your CSV should look like this (headers must match exactly):

dataset.csv

  • x1, x2, x3, ..., y

  • 0.5, 1.2, 3.4, ..., 0

  • 0.7, 0.8, 2.1, ..., 1

  • ...

  • x1, x2, ..., xn are your features.

  • y is the label.

  • Headers are case-sensitive.

  • Make sure to include all headers, or training will not start.


⁠ZIP Format (Image Dataset)

Organize your .zip file like this:

dataset.zip

  • class1

    • image1.jpg
    • image2.jpg
    • ...
  • class2

    • image1.jpg
    • image2.jpg
    • ...
  • ...

  • Each folder represents a class label.

  • Inside folders, use image formats like .jpg, .png.

  • Non-image files inside folders will be ignored.

  • The app automatically extracts and deletes temporary files after training.

  • The program only accepts zip files. Make sure the file is zipped!

  • If any corrupted file is skipped the program outputs an info message on the UI.


⁠Returns

The program returns the following:

  • A loss plot showing the losses through the epochs (downloadable).
  • A video showing the path the model followed to its minima if the checkbox is selected, otherwise a black video is generated (downloadable).
  • The complete trained model and architecture (downloadable).
  • Losses on every Epoch written out at the bottom of the screen (readable but not downloadable).

⁠Training Tab: Image Resize, Channels, Loss Function, Optimizer

⁠Image Resize
  • All input images are resized before training.

  • Set value in: Image Resize (size_box)

  • Example: 28 → Resizes images to 28×28.

  • Purpose: Ensure consistent input size to avoid shape mismatches.

⁠Input Channels

  • Control color mode of input images.

    • Options:

      1 → Grayscale

      3 → RGB color

    • Set in: Input Channels (channel_dropdown)

    Note: For tabular data (CSV), this is ignored.

⁠Loss Function

⁠Define loss calculation for backpropagation.

Options:

  • CrossEntropyLoss: For classification (e.g., cat/dog). Use when labels are class indices (0, 1, 2, ...). Softmax is internal.

  • MSELoss: For regression or if you want probability output with manual softmax.

  • Set in: Loss Function (loss_dropdown) Behavior:

     - If MSELoss is selected and classification data is used, one-hot encoding + softmax is applied internally.
    
      - If CrossEntropyLoss, ensure target labels are integers (not one-hot).
    

⁠Optimizer

  • Controls weight updates during training.

    Options:

      - Adam: Adaptive learning rate, recommended default.
    
      - SGD: Standard stochastic gradient descent.
    

    Set in: Optimizer in the dropdown

Corrupted Image Handling

- Corrupted images are skipped automatically.

- Warnings are shown in the Gradio Info bubble.

Workflow Summary

  • Images resized to target size.

  • Images converted to target channel mode (RGB or grayscale).

  • Dataset checked for corruptions, skipped if needed.

  • Loss and optimizer selected based on UI.

  • Training starts, logs are shown live.

Notes

  • Tabular data (CSV): Resize and channels are ignored.
  • Animation: If enabled, generates 3D loss descent animation.

⁠Extendability

The program is built to be modular:

  • You can easily add more layers to the backend.
  • All layers follow a consistent internal config for easy expansion.

⁠Final Note

If you think of improvements or want to extend the features, feel free to hack away!


⁠Features

  • Drag-and-drop neural network builder (Gradio web interface)
  • Training progress log and loss curve plotting
  • Dynamic PCA-based 3D animation of loss descent
  • Downloadable model artifacts after training
  • Auto GPU detection (NVIDIA CUDA)

⁠Requirements

  • Docker 20.10+
  • Optional: NVIDIA GPU with CUDA drivers (for acceleration)

⁠License

MIT License — free for personal and commercial use.


⁠Author

Created by as2528.

Tag summary

Content type

Image

Digest

sha256:4def3d396…

Size

7.4 GB

Last updated

over 1 year ago

docker pull as2528/neural-dashboard