from PIL import Image
image = Image.fromarray(layer.numpy()).resize((3600, 4800))
でもいけるっぽい