title: AttributeError: 'numpy.dtype' object has no attribute 'is_floating'
body: <p>I develop my own op using eager execution. I met an error. How to fix it?</p>
  
  <blockquote>
    <p>Env: Colaboratory TF ver.: 1.14</p>
  </blockquote>
  
  <p>I use:</p>
  
  <pre><code>mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
  </code></pre>
  
  <p>I tried <code>tf.convert_to_tensor()</code> but it led to other error. Error caused by:</p>
  
  <pre class="lang-py prettyprint-override"><code>loss_value, grads = grad(x_, y)
  </code></pre>
  
  <p>Error message:</p>
  
  <pre class="lang-py prettyprint-override"><code>    962     flat_sources = [_handle_or_self(x) for x in flat_sources]
      963     for t in flat_sources_raw:
  --&gt; 964       if not t.dtype.is_floating:
      965         logging.vlog(
      966             logging.WARN, "The dtype of the source tensor must be "
  
  AttributeError: 'numpy.dtype' object has no attribute 'is_floating'
  </code></pre>