diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-12-02 00:41:11 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-12-02 00:41:11 +0100 |
| commit | f4b6e02846b7068d5cc951f9341d0104fb2c3fa4 (patch) | |
| tree | 6578b27cbda921c43afcfa29611c3196d365aa76 /cli/app/commands | |
| parent | b8fdc65ea615546b5ecd714b7106e98f6c81766a (diff) | |
getting it working
Diffstat (limited to 'cli/app/commands')
| -rw-r--r-- | cli/app/commands/process/random.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cli/app/commands/process/random.py b/cli/app/commands/process/random.py index 900c04f..994afce 100644 --- a/cli/app/commands/process/random.py +++ b/cli/app/commands/process/random.py @@ -16,9 +16,10 @@ from PIL import Image def cli(ctx): """ """ + print("Loading Tensorflow....") import tensorflow as tf import tensorflow_hub as hub - + module = hub.Module('https://tfhub.dev/deepmind/bigbigan-resnet50/1') # Sample a batch of 8 random latent vectors (z) from the Gaussian prior. Then @@ -27,6 +28,8 @@ def cli(ctx): z = tf.random.normal([8, 120]) # latent samples gen_samples = module(z, signature='generate', as_dict=True)['upsampled'] + print(gen_samples) + for sample in gen_samples: img = Image.fromarray(sample, "RGB") fp_img_out = int(time.time() * 1000) + '.png' |
