Convolution on an image

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. ...

Get Neural Network Programming with TensorFlow now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.