Hi, I’m doing image segmentation for 3D image. I would like to slice my 3D image and save it to a file so that I could construct a dataloader.
There is some way in Pytorch to save the tensors in a folder?
Thank you in advance
Is this code below will solve my problem?
torchvision.utils.save_image(tensor, filename, nrow=8, padding=2, normalize=False, range=None, scale_each=False, pad_value=0)

In this case, all the tensors will be saved as PIL images.