title: Patch based image training and combine their probability from an image
body: <p>Firstly, I have implemented a simple <code>VGG16</code> network for image classification.</p>
  <pre><code>model = keras.applications.vgg16.VGG16(include_top = False,
                  weights = None,
                  input_shape = (32,32,3),
                  pooling = 'max',
                  classes = 10)
  </code></pre>
  <p>Whose input shape is <code>32 x 32</code>. Now, I am trying to implement a <code>patch-based neural network</code>. The main idea is, from the input image, extract 4 image patch like this image,</p>
  <p><a href="https://i.stack.imgur.com/Ugl9Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ugl9Z.png" alt="enter image description here" /></a></p>
  <p>and train the extracted patch image(<code>resizing to 32 x 32</code> as it is input shape of our model) finally, combine their four output probability and find the final output result (Using normalizing &amp; argmax). Like this,</p>
  <p><a href="https://i.stack.imgur.com/g4p1s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g4p1s.png" alt="enter image description here" /></a></p>
  <p><strong>How can I do that?</strong></p>
  <p>Thanks in advance for your help.</p>
  <p><strong>Note:</strong></p>
  <p>I am guessing using <code>lambda layer</code> it can be possible.</p>
  <p>My simple VGG classification implementation is <a href="https://colab.research.google.com/drive/1AvLQVQAA10RBEx-Sl4l4hD3Bv83CV6dP?usp=sharing" rel="nofollow noreferrer">here in Colab</a>.</p>