title: How to subtract channel wise mean in keras?
body: <p>I have implemented a lambda function to resize an image from 28x28x1 to 224x224x3. I need to subtract the VGG mean from all the channels. When i try this, i get an error </p>
  
  <p>TypeError: 'Tensor' object does not support item assignment </p>
  
  <pre><code>def try_reshape_to_vgg(x):
      x = K.repeat_elements(x, 3, axis=3)
      x = K.resize_images(x, 8, 8, data_format="channels_last")
      x[:, :, :, 0] = x[:, :, :, 0] - 103.939
      x[:, :, :, 1] = x[:, :, :, 1] - 116.779
      x[:, :, :, 2] = x[:, :, :, 2] - 123.68
      return x[:, :, :, ::-1]
  </code></pre>
  
  <p>What's the recommended solution to do element wise subtraction of tensors?</p>