diff options
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) |
