diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-01-10 16:08:21 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-01-10 16:08:21 +0100 |
| commit | 28ab637b02dc950dbf786dc97e3a51da416ace89 (patch) | |
| tree | af3c357400f6fed2bfd31e8ac0bcf0c76172f126 | |
| parent | ab17d875487671655aefc1aab916f5e64132d68e (diff) | |
graph magic
| -rw-r--r-- | cli/app/search/live.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cli/app/search/live.py b/cli/app/search/live.py index 2c8c9eb..8c31e6d 100644 --- a/cli/app/search/live.py +++ b/cli/app/search/live.py @@ -220,11 +220,12 @@ class Interpolator: gen_layer_name = 'module_apply_' + gen_signature + '/' + params.inv_layer encoding_latent = tf.get_default_graph().get_tensor_by_name(gen_layer_name) - encoding_shape_specific = tuple([1,] + encoding_latent.get_shape().as_list()[1:]) encoding_shape = encoding_latent.get_shape().as_list() + encoding_shape_specific = tuple([1,] + encoding_shape[1:]) + encoding_shape_placeholder = tf.constant(np.zeros(encoding_shape_specific, dtype=np.float32)) - encoding_stored = LerpParam('encoding_stored', shape=encoding_shape, datatype="encoding") - encoding_mix = LerpParam('encoding_mix', a_in=encoding_latent, b_in=encoding_shape_placeholder, shape=encoding_shape, datatype="encoding") + encoding_stored = LerpParam('encoding_stored', shape=encoding_shape_specific, datatype="encoding") + encoding_mix = LerpParam('encoding_mix', a_in=encoding_stored, b_in=encoding_shape_placeholder, shape=encoding_shape_specific, datatype="encoding") # use the placeholder to redirect parts of the graph. # - computed encoding goes into the encoding_mix # - encoding mix output goes into the main biggan graph |
