title: Define a binary mask in Keras
body: <p>I have an input image of shape [X,Y,3] and I have 2 coordinates (x,y). Now I want to create a mask with these coordinates and then multiply it with the input image. The mask should be a binary matrix with the same size as the image, with ones at coordinates <code>[x:x+p_size,y:y+p_size]</code> and zeros elsewhere.</p>
  
  <p>My question is how to define the mask in Keras (tensorflow backend)?</p>
  
  <p>note that this operation happens within the model (so simply using numpy won't help).</p>
  
  <pre><code>img = Input(shape=(32,32,3))
  xy = Input(shape=(2)) # x and y coordinates for the mask
  mask = ?
  output = keras.layers.Multiply()([img, mask])
  </code></pre>