I have tried to add an image to the tensorboard.
img = Image.open(image_path)
img = (np.asarray(img) / 255.0)
img = torch.from_numpy(img).float()
img = img.cuda().permute(2, 0, 1)
img = img.cuda().unsqueeze(0)
writer.add_image('Original', img)
but there is an error.
tensor shape: {}, input_format: {}".format(tensor.shape, input_format) AssertionError: size of input tensor and input format are different. tensor shape: (1, 3, 420, 629), input_format: CHW