promptdojo_

CNNs and local patterns — step 6 of 7

Write conv1d(signal, kernel) — a 1-D convolution. Slide the kernel over the signal; at each valid position compute the dot product of the window with the kernel. Return the list of outputs (length len(signal) - len(kernel) + 1).

full-screen editor opens — close anytime to keep reading.