summaryrefslogtreecommitdiff
path: root/cli/app/commands
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-12-02 00:41:11 +0100
committerJules Laplace <julescarbon@gmail.com>2019-12-02 00:41:11 +0100
commitf4b6e02846b7068d5cc951f9341d0104fb2c3fa4 (patch)
tree6578b27cbda921c43afcfa29611c3196d365aa76 /cli/app/commands
parentb8fdc65ea615546b5ecd714b7106e98f6c81766a (diff)
getting it working
Diffstat (limited to 'cli/app/commands')
-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'