summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/app/commands/process/random.py5
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'