From f4b6e02846b7068d5cc951f9341d0104fb2c3fa4 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 2 Dec 2019 00:41:11 +0100 Subject: getting it working --- cli/app/commands/process/random.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cli/app/commands') 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' -- cgit v1.2.3-70-g09d2