I guess the view operations will interleave the image pixels, if you try to swap the dimensions with them.
Check which shape each loaded sample has in your ImagesDataset.
If the sample has the shape [height, weight, channels], you should call sample = sample.permute(2, 0, 1) instead of sample = sample.view(3,256,256).
The same applies for the output of your model:
test_image = gen(noise).cpu().detach()[0].view(256,256,3)

Which is most likely wrong, as PyTorch uses the layout [batch_size, channels, height, width].