Question 1: Single choice
mediumAI-checkedConvolutional Neural NetworksSciPy's convolve2d computes a true convolution:
import numpy as np
from scipy.signal import convolve2d
X = np.zeros((6, 6)); X[:, :3] = 3.0; X[:, 3:] = 1.0 # bright left half, dark right half
K = np.zeros((3, 3)); K[:, 0] = 2.0; K[:, 2] = -2.0 # every row of K is [2, 0, -2]
out = convolve2d(X, K, mode="valid")
What is the first row of out?