localbitsback icon indicating copy to clipboard operation
localbitsback copied to clipboard

Basic code to make images

Open atgambardella opened this issue 5 years ago • 0 comments

import torch

from compression.models.load_flowpp_imagenet64 import load_imagenet64_model

model = load_imagenet64_model('/your/data/folder/flowpp_imagenet64_model.npz', False)
noise = torch.randn(1, 192, 8, 8).double()                                                                                                        

img, _ = model.main_flow(noise, aux=None, inverse=True)

noise2, _ = model.main_flow(img, aux=None, inverse=False)

Note that your z vector has to have shape 192, 8, 8 for the imagenet64 flow model.

atgambardella avatar Nov 21 '19 09:11 atgambardella