title: TypeError: Cannot handle the data type in PIL Image
body: <p>I have a Pytorch tensor of size (4,3,224,224). When I am trying to convert the first tensor into an Image object, it says:</p>
  
  <pre><code>TypeError: Cannot handle this data type
  </code></pre>
  
  <p>I ran the following command:</p>
  
  <pre><code>img = Image.fromarray(data[0][i].numpy().astype(np.uint8))
  </code></pre>
  
  <p>where data is the Pytorch tensor</p>
  
  <p>I tried other solutions but couldn't find any solution.</p>
  
  <p>Please suggest !!</p>