title: tf.keras.backend way of replacing a tensors value if it's less than 1
body: <p>I am using Keras with the Tensorflow backend.</p>
  
  <p>In my loss function I have a tensor where I need to replace the elements that are less than 1 with a 1.</p>
  
  <p>I can see loads of functions available to me in the docs
  <a href="https://www.tensorflow.org/api_docs/python/tf/keras/backend" rel="nofollow noreferrer">https://www.tensorflow.org/api_docs/python/tf/keras/backend</a></p>
  
  <p>but I'm not sure how to go about this.</p>
  
  <p>If I do:</p>
  
  <pre><code>a_ = tf.Print(
      message='a_shape',
      input_=a_,
      data=[tf.shape(a_)]
  )
  </code></pre>
  
  <p>I get the shape as:</p>
  
  <pre><code>y_shape[128]
  </code></pre>
  
  <p>I need to essentially iterate through this tensor replacing elements that are less than 1 with a 1.</p>
  
  <p>How would I do this using the keras tensorflow API?</p>
  
  <p>Thanks -</p>