title: Keras: How to Multiply()?
body: <p><strong>TensorFlow 2.0 RC1</strong></p>
  
  <pre><code>import tensorflow as tf
  from tensorflow.keras.models import Model
  from tensorflow.keras.layers import Input, Multiply
  
  import numpy as np
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>Multiply()([np.array([1,2,3,4,4,4]).reshape(2,3), np.array([1,0])])
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/XIYg3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XIYg3.png" alt="enter image description here"></a></p>
  
  <p>Problem:</p>
  
  <pre><code>input_1 = Input(shape=(None,3))
  mask_1 = Input(shape=(None,))
  
  net = Multiply()([input_1, mask_1])
  net = Model(inputs=[input_1, mask_1], outputs=net)
  
  net.predict([np.array([1,2,3,4,4,4]).reshape(1,2,3), np.array([1,0]).reshape(1,2)]) # 1 = batch size
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/nMdEb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nMdEb.png" alt="enter image description here"></a></p>
  
  <p>How to fix this problem?</p>