Guides
Build a neural network without code and export it to PyTorch
You can design a neural network by connecting layers on a canvas, and still end up with ordinary PyTorch code. This guide builds a small convolutional network for 28×28 images, checks it and exports it, without an account.
What you need
A current browser. Building, checking and exporting work without an account and cost nothing; only saving networks in an account, uploading data and training on the server need a free account. The exported code needs Python and PyTorch on your own machine.
Build the network
Open the editor. On a first visit it shows an example so that there is something to look at; File → New network gives an empty canvas.
Start with an Input
Drag
Inputfrom the palette onto the canvas and set its shape without the batch dimension:1, 28, 28for one grayscale channel of 28 × 28 pixels, or784for the same image as a flat vector.Add layers
Drag
Conv2donto the canvas and connect the right edge of the Input to the left edge of the new layer. With a layer selected, clicking a layer in the palette (or pressing Enter on it) appends the new one after the selected layer and connects them. Continue withActivation(ReLU),MaxPool2d, a second convolution block,Flattenand twoLinearlayers, the last with 10 outputs.Set what matters, let Brick DNN fill in the rest
Select a layer to see its settings. You set what is a design decision, such as
out_channelsorkernel_size; fields that follow from the incoming tensor, such asin_channelsandin_features, are filled in automatically, also after you change an earlier layer.Read the shapes
Every layer shows its output shape and parameter count while you build. A mistake is marked in red before anything runs, with a message that says what to change, for example that a kernel is larger than its input. The layers after it have no shape until it is fixed.

Skip connections (Add), merges (Concat) and several inputs work the same way: connect the tensors and the shape inference checks that they fit. Tidy up layout arranges a network that has grown untidy.
Check that it does what you think
The toolbar counts the trainable parameters of the whole network. The inspector of a selected layer explains how its parameters add up and what its receptive field is. How data flows steps one sample through the network, layer by layer, and shows how each layer changes its shape, for example how max pooling turns 32 × 28 × 28 values into 32 × 14 × 14.

Export the PyTorch code
Code in the toolbar opens the generated script. It is a self-contained Python file: an nn.Module with one named attribute per layer in __init__ and a forward method in the order of the graph. You can change the class name, and whether the file is a runnable script (a __main__ part that prints the model and runs a random batch through it). For a network with one flat input and one flat output it can also contain a training loop for CSV files. Export .py (Ctrl+E) downloads it.

On your machine, python model.py prints the model, the number of trainable parameters and the output shape of a random batch, which should match what the editor showed. The code imports nothing from Brick DNN, so you can change it, put it in a repository or a paper, and train it with your own loop. The example page of this CNN shows the complete script.
Optional: train it on the server
With a free account, Train runs the network on Brick DNN’s server in Switzerland. Choose MNIST, Fashion-MNIST, CIFAR-10, your own CSV file or a ZIP file of images. Brick DNN checks beforehand whether network and data fit, adapts the Input and the last layer if only those differ, and then shows loss and accuracy per epoch. When the run is finished, download the weights (.pt) together with the matching script:
import torch
from model import NeuralNetwork # the downloaded script
model = NeuralNetwork()
model.load_state_dict(torch.load("model.pt"))
model.eval()
Keep and share the network
Save as JSON file in the File menu keeps the graph without an account, and Open JSON file brings it back. With an account, networks are saved with their history and can be shared with people or by link and edited together live. The graph format is documented in graph-format.md, and the same networks can be built by an AI assistant over the MCP server.
Examples to start from
Small CNN for MNIST
Two convolution blocks and a classifier head: about 99 % test accuracy on MNIST.
MLP for MNIST
A multi-layer perceptron: 784 pixel values, two hidden layers, ten class scores.
Residual CNN for CIFAR-10
A ResNet-style block with a skip connection merged by Add, then global average pooling.
More guides
Tabular data: gradient boosting vs. MLP, and when to use which
How trees and neural networks see a table, what each needs, and how to compare them fairly on the same split.
Image segmentation with a U-Net: from masks to a trained model
From a ZIP file of images and masks to a trained U-Net, with mean IoU, Dice and the predicted masks.
Imbalanced classes: class weights, focal loss, oversampling and the decision threshold
Why accuracy misleads when one class is rare, and the four levers against it: weights, focal loss, oversampling and the threshold.
GDPR-compliant deep learning: training neural networks with data in Europe
Which data needs care under the GDPR, where brickdnn.com stores and trains in Switzerland, and what to do with data that has to stay personal.
Common PyTorch shape errors and how to fix them
The exact messages of the most common PyTorch shape errors, what causes each one and how to fix it.