title: pytorch math with exponents less than 1 return nan 's
body: <p>torch.pow() returns nan when it's given the exponent argument between ranges -1 and 1</p>
  
  <pre><code>a = torch.randn(1,3)
  a
  
  &gt;&gt; tensor([[-1.7871, -0.5375, -0.1164]])
  
  torch.pow(a, 2)      #or a**2
  
  &gt;&gt; tensor([[3.1938, 0.2889, 0.0136]])
  
  torch.pow(a,0.5)     #or a**0.5
  
  &gt;&gt; tensor([[nan, nan, nan]])
  </code></pre>
  
  <p>expect result:</p>
  
  <pre><code>tensor([[-1.3368, -0.7331, -0.3412]])
  </code></pre>
  
  <p>Edit: turns out that ** works the same way as well. <code>a**2</code> does the same thing with the tensor as <code>torch.pow(a,2)</code>.  <code>a**0.5</code> returns nan's like torch.pow does. </p>