title: How to parse tensor without giving out_type in tensorflow?
body: <p>When parsing a serialized tensor, the <code>tf.io.parse_tensor</code> has a required kwarg &quot;out_type&quot;. However it seems that tf does not need this to know the type of the serialized tensor because when one gives a wrong type, it manages to print out the good one.</p>
  <p>How could then I parse without this arg?</p>
  <p>MWE:</p>
  <pre class="lang-py prettyprint-override"><code>tf.io.parse_tensor(tf.io.serialize_tensor(tf.constant([1])), tf.int32)
  
  tf.io.parse_tensor(tf.io.serialize_tensor(tf.constant([1])))
  Traceback (most recent call last):
    File &quot;&lt;input&gt;&quot;, line 1, in &lt;module&gt;
  TypeError: parse_tensor() missing 1 required positional argument: 'out_type'
  
  tf.io.parse_tensor(tf.io.serialize_tensor(tf.constant([1])), tf.float32)
  Traceback (most recent call last):
    File &quot;&lt;input&gt;&quot;, line 1, in &lt;module&gt;
    File &quot;/Users/clementwalter/.pyenv/versions/keras_fsl/lib/python3.6/site-packages/tensorflow/python/ops/gen_parsing_ops.py&quot;, line 2160, in parse_tensor
      _ops.raise_from_not_ok_status(e, name)
    File &quot;/Users/clementwalter/.pyenv/versions/keras_fsl/lib/python3.6/site-packages/tensorflow/python/framework/ops.py&quot;, line 6653, in raise_from_not_ok_status
      six.raise_from(core._status_to_exception(e.code, message), None)
    File &quot;&lt;string&gt;&quot;, line 3, in raise_from
  tensorflow.python.framework.errors_impl.InvalidArgumentError: Type mismatch between parsed tensor (int32) and dtype (float) [Op:ParseTensor]
  </code></pre>