Convolution Operation
عملية الالتفاف
Definition
Sliding a small filter over the input and computing the sum of products at each position to extract local patterns.
Definition
Convolution slides a small learned filter over the input computing weighted sums at each position, sharing weights across space to detect local patterns.
Practical examples
import numpy as np
x = np.array([1, 2, 3, 4, 5])
k = np.array([1, 0, -1])
print(np.correlate(x, k, mode='valid').tolist())Expected output
[-2, -2, -2]
