summaryrefslogtreecommitdiff
path: root/cli/app
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-02-22 17:13:00 +0100
committerJules Laplace <julescarbon@gmail.com>2020-02-22 17:13:00 +0100
commit4e9e37fad40c9a7a20d8c6f8e764d7f9755e5058 (patch)
treea37e189e2db562624a9de337f951cc22204fdd61 /cli/app
parent1b5f2564ba464d43a4e28e806e9fe94c3049da56 (diff)
incorporate layers into live script
Diffstat (limited to 'cli/app')
-rw-r--r--cli/app/search/live.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/app/search/live.py b/cli/app/search/live.py
index fb94c12..7dea257 100644
--- a/cli/app/search/live.py
+++ b/cli/app/search/live.py
@@ -316,6 +316,7 @@ class Interpolator:
]
op_input_index = 1
+ split_shape = [1, 16]
for op_name, layer_id in zip(layer_op_names, range(7)):
op_name = 'module_apply_{}/{}'.format(gen_signature, op_name)
tensor_name = 'module_apply_{}/Generator_2/split:{}'.format(gen_signature, layer_id + 1)
@@ -324,8 +325,8 @@ class Interpolator:
## unlike the encoding, here we update the layer op directly, so we don't need a temporary constant to swap
# raw_layer_placeholder = tf.constant(np.zeros(layer_tensor.shape, dtype=np.float32))
- layer_stored = LerpParam('layer_stored_{}'.format(layer_id), shape=layer_tensor.shape, datatype="noise")
- layer_stored_mix = LerpParam('layer_stored_mix_{}'.format(layer_id), a_in=layer_tensor, b_in=layer_stored.output, shape=layer_tensor.shape, datatype="noise")
+ layer_stored = LerpParam('layer_stored_{}'.format(layer_id), shape=split_shape, datatype="noise")
+ layer_stored_mix = LerpParam('layer_stored_mix_{}'.format(layer_id), a_in=layer_tensor, b_in=layer_stored.output, shape=split_shape, datatype="noise")
layer_op._update_input(op_input_index, layer_stored_mix.output)