Documentation Pages
LeNet5 CNN Visualizer
The handwriting character recognition system exposes the inner layer structure of the LeNet-5 CNN model to provide interactive weight and activation inspection interfaces.
1. Exposed Layer Topology
By adding intermediate value_info tensors to the graph outputs during model loading, the backend extracts the following activations dynamically for every input:
- Input Layer: Grayscale pixel array of shape
[28, 28]. - Conv1 Output (ReLU): Channel tensors of shape
[8, 28, 28]. - Pool1 Output: Subsampled tensors of shape
[8, 14, 14]. - Conv2 Output (ReLU): Channel tensors of shape
[16, 14, 14]. - Pool2 Output: Subsampled tensors of shape
[16, 4, 4]. - Dense Inputs: Flattened vector of shape
[256]. - Logits / Probs: Final predictions of shape
[10].
2. Dynamic Weight Mapping
Static weight matrices are converted to standard arrays at startup:
- Conv1 kernels are loaded as shape
[8, 1, 5, 5]along with 8 biases. - Conv2 kernels are shape
[16, 8, 5, 5]. - FC connection weights are shape
[256, 10]. In the mobile client, this matrix is visualized as a 16x16 interactive grid heat-map, highlighting positive weights in blue and negative weights in red.
LeNet-5 Explainability Output Architecture

Interactive CNN Explainability Output