title: Tensorflow.js: expandDims() + cast() issue
body: <p>I need to provide a <code>float32</code> tensor for my model. I need to use <code>expandDims(tensor, axis=0)</code> to change its shape from <code>[240, 320, 3]</code> to <code>[1, 240, 320, 3]</code>. However, it appears that the <code>expandDims()</code> operation casts my tensor to <code>int32</code>.</p>
  
  <p>When I perform <code>cast(tensor, "float32")</code> on this tensor, it appears that the <code>cast</code> operation squeezes my tensor back to <code>[240, 320, 3]</code>. </p>
  
  <pre><code>image_v = (tf.cast(image_raw, "float32") / 255.0) - 0.5;
  image_v = tf.expandDims(image_raw, 0); 
  console.log(image_v.shape) // shape: [1, 240, 320, 3]
  console.log(image_v.dtype) // dtype: "int32"
  
  image_v = tf.cast(image_raw, "float32") 
  console.log(image_v.shape) // shape: [240, 320, 3]
  console.log(image_v.dtype) // dtype: "float32"
  </code></pre>
  
  <p>I am looking for a way to expand dims on a <code>float32</code> tensor in <code>tensorflow.js</code> and have the tensor's <code>dtype</code> remain <code>float32</code>. Any help would be appreciated!</p>