Hi @barrel-roll,
The reason why you got TypeError: Input type float32 is not supported is because the default transforms.ToPILImage() has mode=None and the third dimension in your synthetic data is 2 (which is usually set to 3 for color images), leading to the TypeError here https://github.com/pytorch/vision/blob/master/torchvision/transforms/functional.py#L138 279. (you can follow the source code from here https://github.com/pytorch/vision/blob/master/torchvision/transforms/functional.py#L81 159 where the pic you gave is (75, 75, 2) and mode is None).
One solution is to set the data shape to (75, 75, 3) and change imgs = self.transform(np.float32(imgs)) to imgs = self.transform(np.uint8(imgs)).
What the ToPILImage() does is basically to call Image.fromarray(), so you might want to have a look at https://pillow.readthedocs.io/en/5.0.0/reference/Image.html 366.