I was trying trying to run tensorboard module in Pytorch with 3D image data with the following code:
class GetTB(object): def __init__(self, img, lbl, model): self.image = img self.label = lbl self.model = model def WorkTB(self): tb = SummaryWriter() grid = torchvision.utils.make_grid(self.image) tb.add_image("images", grid) tb.add_graph(model, self.image) tb.close() A = GetTB(images, labels, model).WorkTB()
A bit about the images and labels is: images have
B,C,H,W,D dimensions. which is C=1 for images and C=5/6 for the one-hot encoded label.
Now in my search the
make_grid() documentation mentions images to be:
Args: tensor (Tensor or list): 4D mini-batch Tensor of shape (B x C x H x W) or a list of images all of the same size.
Does it indicate
tensorboard only works with RGB image data?
I also couldn’t find any sort of implementation tutorial/article for specific 3D data. If anyone updates would be highly appreciated.