title: RMSE computation incorporating neighboring pixels in tensorflow
body: <p>I am training a FCNN using tensorflow with Keras and I currently use RMSE for validation as:</p>
  <pre><code>import tensorflow
  from tensorflow.python.keras import backend
  def rmse(y_true, y_pred):
      return backend.sqrt(backend.mean(backend.square(y_pred - y_true)))
  </code></pre>
  <p>but instead of pixel by pixel comparison I would like to compute the RMSE incorporating neighboring pixels, meaning for each pixel the error would be calculated considering the same corresponding pixel in the y_true plus it's 3x3 or 5x5 neighboring pixels.</p>
  <p>How do I implement this in keras?</p>