diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-12-09 10:00:27 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-12-09 10:00:27 +0100 |
| commit | 02c5b7641ac0c50deb881b5adf6abb8e929a5947 (patch) | |
| tree | 3241a7bacfb09bbe642e586c2f1e149b27d631df /cli/app/commands | |
| parent | 40300c85d0b622e1f23eb7f2c6f57e6df46d476e (diff) | |
fix
Diffstat (limited to 'cli/app/commands')
| -rw-r--r-- | cli/app/commands/biggan/search.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/app/commands/biggan/search.py b/cli/app/commands/biggan/search.py index b15e202..3479680 100644 --- a/cli/app/commands/biggan/search.py +++ b/cli/app/commands/biggan/search.py @@ -13,6 +13,8 @@ from subprocess import call import cv2 as cv from PIL import Image from glob import glob +import tensorflow as tf +import tensorflow_hub as hub def image_to_uint8(x): """Converts [-1, 1] float array to [0, 255] uint8.""" @@ -97,9 +99,6 @@ def cli(ctx, opt_fp_in, opt_dims): """ Search for an image in BigGAN using gradient descent """ - import tensorflow as tf - import tensorflow_hub as hub - generator = hub.Module('https://tfhub.dev/deepmind/biggan-' + str(opt_dims) + '/2') inputs = {k: tf.compat.v1.placeholder(v.dtype, v.get_shape().as_list(), k) |
