title: Element-wise multiplication in keras + TF custom loss function
body: <p>I'm trying to write a custom loss function using Keras + TensorFlow. I'm getting error while trying to add an element-wise multiplication operation:</p>
  <pre><code>def new_loss(y_true, y_pred):
  
      pi = np.pi 
      d = pi/4 + (pi/4) * (y_pred - y_true)
  
      a = tf.keras.layers.Multiply()([K.sin(d), -K.log(K.cos(d))])
  </code></pre>
  <p>Apparently this is wrong, and I'm getting error:</p>
  <pre><code>tensorflow.python.framework.errors_impl.InvalidArgumentError:  You must feed a value for placeholder tensor 'dense_2_target' with dtype float and shape [?,?]
       [[node dense_2_target (defined at Q:\PycharmProjects\loss_function\custom_loss.py:25) ]] [Op:__inference_keras_scratch_graph_164]
  </code></pre>
  <p>PS: Do I really need to write these operations in TensorFlow since I'm operating on Tensors? Can I convert 'y_true' and 'y_pred' to Numpy arrays? How to do this?</p>