Deep learning visualizer
Convolutional Neural Network (CNN) Visualizer
Visualize the complete CNN workflow from convolution and pooling to dropout, softmax, and prediction.
Choose an input
True label: 0
Stage 2 of 8
Conv
Input windowrows 1-2, cols 1-2
KernelFilter 1
-0.230.17-0.110.050.36-0.240.14-0.310.21
Convolution output0 / 784 cells
Next output[0, 0]
Sum of 3 x 3 products plus bias/offset: -0.004 + 0.08 = 0.076
0 x -0.2300 x 0.1700 x -0.1100 x 0.0500.05 x 0.360.0180.06 x -0.24-0.0140 x 0.1400.06 x -0.31-0.0190.05 x 0.210.011
Operation 0 of 784% of this layer
What happens at each layer
Input28 x 28 x 1
Conv28 x 28 x 8
ReLU28 x 28 x 8
Max Pool14 x 14 x 8
Flatten1568
Dense32
Dropoutp mask
Output2 classes
Forward-pass calculations
- Select an input image and true class
- Convolve with learned filters to create feature maps
- Apply activation and pooling
- Flatten features and pass them through dense layers
- Apply dropout during training
- Convert logits to probabilities with softmax
import torch.nn as nnself.features = nn.Sequential(nn.Conv2d(1, filters, kernel_size=k, padding=k//2),nn.ReLU(),nn.MaxPool2d(kernel_size=2),)self.classifier = nn.Sequential(nn.Flatten(), nn.Linear(filters * 14 * 14, dense),nn.Dropout(p=dropout), nn.Linear(dense, 2))