title: TypeError: Input 'y' of 'Mul' Op has type float32 that does not match type float64 of argument 'x'
body: <p>Tensorflow 1.10 on Google Colab (python 2.7) or my local system (python 3.6)
  Using sample code from <a href="https://www.tensorflow.org/guide/keras" rel="nofollow noreferrer">https://www.tensorflow.org/guide/keras</a>
  Code is</p>
  
  <pre><code>import numpy as np
  import tensorflow as tf
  from tensorflow import keras
  
  data = np.random.random((1000, 32))
  labels = np.random.random((1000, 10))
  dataset1 = tf.data.Dataset.from_tensor_slices((data, labels))
  dataset1 = dataset1.batch(32)
  dataset1 = dataset1.repeat()
  
  model = keras.Sequential()
  model.add(keras.layers.Dense(64, activation='relu'))
  model.add(keras.layers.Dense(64, activation='relu'))
  model.add(keras.layers.Dense(10, activation='softmax'))
  
  model.compile(optimizer=tf.train.AdamOptimizer(0.001),
                loss='categorical_crossentropy',
                metrics=['accuracy'])
  
  model.fit(dataset1, epochs=10, steps_per_epoch=30)
  </code></pre>
  
  <p>Throws the following error: </p>
  
  <pre><code>    Error TypeError: Input 'y' of 'Mul' Op has type float32 that does not match type float64 of argument 'x'.
  
  packages/tensorflow/python/framework/op_def_library.pyc in _apply_op_helper(self, op_type_name, name, **keywords)
      544                   "%s type %s of argument '%s'." %
      545                   (prefix, dtypes.as_dtype(attrs[input_arg.type_attr]).name,
  --&gt; 546                    inferred_from[input_arg.type_attr]))
      547 
      548           types = [values.dtype]
  
  TypeError: Input 'y' of 'Mul' Op has type float32 that does not match type float64 of argument 'x'.
  </code></pre>