// interactive playground
step 0 / 0
Input height7
Input width7
Input channels3
Kernel size3
Stride1
Padding0
Dilation1
Output filters1
Animation speed2×
Input
Output
input cell
zero-padding
receptive field
output cell
// kernel volume
// output volume
Output shape
out=⌊(in+2·pad−dilation·(k−1)−1)/stride⌋+1
Height—
Width—
Channels—
Layer weights
weights=C_in×k×k×C_out
Weights—
Biases—
Total params—
// the same layer in pytorch
import torch
import torch.nn as nn
conv = nn.Conv2d(
in_channels=3,
out_channels=1,
kernel_size=3,
stride=1,
padding=0,
dilation=1,
bias=True,
)
x = torch.randn(8, 3, 7, 7)
y = conv(x)