Example networks with diagram, shapes and code
Each example below is a network that ships with Brick DNN. Its page shows how the layers are connected, the output shape and parameter count of every layer, and the complete script the editor generates, in PyTorch for neural networks and in scikit-learn for classical models. Open any of them in the editor to change it, check it and train it.
Images
From a multi-layer perceptron on flattened digits to a U-Net that labels every pixel.
MLP for MNIST
A multi-layer perceptron: 784 pixel values, two hidden layers, ten class scores.
Small CNN for MNIST
Two convolution blocks and a classifier head: about 99 % test accuracy on MNIST.
Residual CNN for CIFAR-10
A ResNet-style block with a skip connection merged by Add, then global average pooling.
U-Net for segmentation
Encoder, decoder and skip connections: a class for every pixel, trained on the built-in Shapes data.
U-Net classifier
The U-Net architecture with a classification head: global pooling and a Linear layer give ten class scores.
Text
Sequences of token ids, classified by a recurrent network or a Transformer encoder.
LSTM text classifier
Token ids → embeddings → bidirectional LSTM → positive or negative.
Transformer text classifier
A small Transformer encoder with learned positional embeddings and mean pooling, four classes.
Tables and mixed inputs
Neural networks for rows of numbers, a network with two inputs, and a hybrid of an MLP and gradient boosting.
Tabular regression
Predicts one number from 8 numeric features; the script trains on a CSV file.
Multi-input model
An image and a vector of metadata, combined with Concat, predict one number.
MLP features for gradient boosting
An MLP learns 32 features, then gradient-boosted trees are fitted on them and predict the class.
Classical models
Models for tabular data, built from bricks like the networks: gradient boosting with scikit-learn or LightGBM, a support vector machine and Gaussian processes with kernels.
Gradient boosting classifier
Gradient-boosted trees classify rows of 30 features; balanced class weights for rare classes.
LightGBM classifier
LightGBM grows its trees leaf by leaf; early stopping on the validation rows picks how many.
SVM classifier
A support vector machine with an RBF kernel classifies rows of 4 features, with probabilities.
Gaussian process regression
Predicts a number with its uncertainty; the kernel is a scaled RBF plus white noise.
Periodic Gaussian process
A seasonal pattern (RBF × ExpSineSquared) plus a smooth trend and noise, for a value over time.
Ensembles
Several classical models combined by voting or by stacking.
Voting ensemble
Gradient boosting, an SVM and a Gaussian process; soft voting averages their probabilities.
Stacking ensemble regression
Gradient boosting, an SVR and a Gaussian process, combined by a ridge regression.
XGBoost, LightGBM and CatBoost stacked
The three boosting libraries of tabular competitions, combined by a logistic regression.
The diagrams, shapes, parameter counts and code on these pages are produced from the examples themselves, with the same shape inference and code generator as the editor.