Available in the low-level API, tf.nn.conv2d() (refer to the documentation at https://www.tensorflow.org/api_docs/python/tf/nn/conv2d) is the default choice for image convolution. Its main parameters are as follows:
- input: The batch of input images, of shape (B, H, W, D), with B being the batch size.
- filter: The N filters stacked into a tensor of shape (kH, kW, D, N).
- strides: A list of four integers representing the stride for each dimension of the batched input. Typically, you would use [1, sH, sW, 1] (that is, applying a custom stride only for the two spatial dimensions of the image).
- padding: Either a list of 4 × 2 integers representing the padding before and after each dimension of the batched input, or a string defining which predefined padding case to use; that is, either VALID or SAME (explanations follow).
- name: The name to identify this operation (useful for creating clear, readable graphs).
Note that tf.nn.conv2d...