Dilated Causal Convolution

medium
Unit 10 · CNNs0/3 to milestone

WaveNet-style models use causal, dilated convolutions: output tt only sees inputs at t,t−d,t−2d,…t, t-d, t-2d, \dots

yt=∑k=0K−1wk xt−kdy_t = \sum_{k=0}^{K-1} w_k\, x_{t - k d}

with x<0=0x_{<0} = 0 (left padding), so the output has the same length as the input. Implement causal_dilated_conv1d(x, w, dilation) for 1-D arrays.

#cnn#sequence-models2 visible + 1 hidden tests
solution.py · Python 3.13
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Dilated Causal Convolution · TechGradify