<p>The patch size and the number of features are network hyper-parameters, therefore the are completely arbitrary.</p>

<p>There are rules of thumb, by the way, to follow in order to define a working and performing network.
The kernel size should be small, due to the equivalence between the application of multiple small kernels and lower number of big kernels (it's an image processing topic and it's well explained in the <a href="https://arxiv.org/pdf/1409.1556.pdf" rel="nofollow">VGG paper</a>). In addiction, operations with small filters are way faster to execute.</p>

<p>The number of features to extract (32 in you example) is completely arbitrary and find the right number is somehow an art.</p>
How to understand the convolution parameters in tensorflow?
<p>When I reading the chapter of &quot;Deep MNIST for expert&quot; in tensorflow tutorial.</p>
<p>There give below function for the weight of first layer. I can't understand why the patch size is 5*5 and why features number is 32, are they the random numbers that you can pick anyone or some rules must be followed? and whether the features number &quot;32&quot; is the “Convolution kernel”？</p>
<blockquote>
<p>W_conv1 = weight_variable([5, 5, 1, 32])</p>
<p>First Convolutional Layer</p>
<p>We can now implement our first layer. It will consist of convolution,
followed by max pooling. The convolutional will compute 32 features
for each 5x5 patch. Its weight tensor will have a shape of [5, 5, 1,
32]. The first two dimensions are the patch size, the next is the
number of input channels, and the last is the number of output
channels. We will also have a bias vector with a component for each
output channel.</p>
</blockquote>