title: Type Hinting torch.float for special form type hint
body: <p>I have a function that can take a <code>typing.Union</code> of types including the type <code>torch.float</code>. But if I use the <code>typing.Union</code> type with <code>torch.float</code> as argument, I receive an error. Here is an example:</p>
  <pre><code>from typing import Union
  import torch
  
  def fct(my_float_or_tensor: Union[torch.float, torch.Tensor]):
      pass
  </code></pre>
  <p>And I get the error</p>
  <pre><code>TypeError: Union[t0, t1, ...]: each t must be a type. Got torch.float32.
  </code></pre>
  <p>What am I doing wrong?</p>
  <p>Interestingly, the same problem occurs with the special type <code>typing.Tuple</code> but not if I use <code>torch.float</code> directly when type hinting.</p>