title: why is dimension with matplotlib giving an error
body: <p><a href="https://i.stack.imgur.com/pSrBt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pSrBt.png" alt="enter image description here" /></a></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;iframe src="https://jovian.ml/embed?url=https://jovian.ml/pravin-bnmit/cxr/v/1&amp;cellId=15" title="Jovian Viewer" height="800" width="800" frameborder="0" scrolling="auto"&gt;&lt;/iframe&gt;</code></pre>
  </div>
  </div>
  </p>
  <pre><code>def show_sample(img, target, invert=True):
  if invert:
      plt.imshow(1 - img.permute((1, 2, 0)))
  else:
      plt.imshow(img.permute(1, 2, 0))
  print('Labels:', decode_target(target, text_labels=True))
  </code></pre>
  <p>Trying to display an image but got dimension error when the channel were also properly defined</p>