An interactive browser-based sandbox to explore how repeated convolution and activation functions affect signal propagation in image space. This tool allows you to experiment with different kernels, activation functions, and boundary conditions to observe their impact on signal evolution.
- Interactive Viewer: Visualize signal propagation as a heatmap.
- Customizable Kernels: Edit or paste kernel matrices (3×3 or 5×5).
- Pattern Selection: Choose from predefined input patterns like impulse, lines, squares, and noise.
- Activation Functions: Switch between Identity, ReLU, and tanh.
- Boundary Handling: Experiment with zero padding, wrap, or reflect modes.
- Normalization Options: Per-step standardization or scaling.
- GIF Export: Save the simulation as an animated GIF.
- Open
index.htmlin a modern browser (no server required). - Use the Controls panel to:
- Select a pattern and kernel preset.
- Adjust grid size, steps, and playback FPS.
- Choose activation functions and boundary conditions.
- Click Simulate to generate the propagation.
- Use Play, Pause, or Step to control the animation.
- Export the simulation as a GIF using the Export GIF button.
The simulation is based on the following update rule:
x(t+1) = act(conv(x(t), W))
Where:
x(t)is the signal at timet.Wis the convolution kernel.actis the activation function.
- Diffusion vs Transport: Does energy spread symmetrically or drift?
- Stability: Does the signal explode, vanish, or converge?
- Nonlinearity Bias: How does ReLU affect propagation compared to Identity?
- Boundary Effects: Compare zero padding, wrap, and reflect modes.
This tool is a simplified single-channel model designed for intuition. It does not replicate full CNN training dynamics but helps visualize how kernel structure and nonlinearities shape signal flow over repeated layers.
- HTML5 Canvas: For rendering the simulation.
- Bootstrap 5: For responsive UI components.
- gif.js: For client-side GIF encoding.
This project is open-source and available under the MIT License.