title: Keras layer to change sign of input tensor only to specific elements
body: <p>I would like to write a Keras layer (with TF backend) to invert the sign of the elements 1, 5 and 9 of the input tensor. 
  [for your curiosity: the net deals with four-momenta in the (pT,eta,phi,M) representation. I want to flip the sign of the pseudorapidity component].</p>
  
  <p>Naively, I'd do something like this:</p>
  
  <pre><code>def flip_eta( x ):
     # you can't do this with tensors
     x[1] = -x[1]
     x[5] = -x[5]
     x[9] = -x[9]
  
     return x
  </code></pre>
  
  <p>However, it does not work, and I get the following error:</p>
  
  <pre><code>    x[1] = -x[1]
  TypeError: 'Tensor' object does not support item assignment 
  </code></pre>
  
  <p>I'm not really familiar with TF operations. Is there a simple way to apply a transformation like this?</p>
  
  <p>Cheers,
  Riccardo</p>