code: def test_image_from_torch_tensor(self):
      import torch
  
      # order of channels in torch.tensor => channels, height, width
  
      self.assertEqual(
          Image(torch.tensor(self.img1)),
          Image(np.transpose(self.img1, (1, 2, 0))),
      )
      self.assertEqual(Image(torch.tensor(self.img2)), Image(self.img2))
      self.assertEqual(
          Image(torch.tensor(self.img3)),
          Image(np.transpose(self.img3, (1, 2, 0))),
      )
  
      self.assertEqual(
          Image(torch.tensor(self.img1.astype(np.float32))),
          Image(255 * np.transpose(self.img1, (1, 2, 0))),
      )
      self.assertEqual(
          Image(torch.tensor(self.img2.astype(np.float32))),
          Image(255 * self.img2),
      )
      self.assertEqual(
          Image(torch.tensor(self.img3.astype(np.float32))),
          Image(255 * np.transpose(self.img3, (1, 2, 0))),
      )
  
file_path: aim/tests/sdk/test_image_construction.py
imports: import pytest
  from tests.base import TestBase
  from tests.utils import is_package_installed
  from aim.sdk import Image
  import numpy
label_desc: Use image node_id 1 for calling the TestImageConstruction obj's underlying member method code with example usage: obj.test_image_from_torch_tensor() without return types