If we use a 2D image I as our input, we probably also want to use a 2D kernel K. The preceding equation will look as follows:
As the convolution function is commutative, we can write the preceding equation as follows:
Changing i - m and j -n to additions is referred to as cross-correlation, as that is what is implemented by TensorFlow:
Let's define a simple input and a kernel and run the conv2d operation in TensorFlow. ...