summaryrefslogtreecommitdiff
path: root/cli/app/search
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-01-18 16:24:46 +0100
committerJules Laplace <julescarbon@gmail.com>2020-01-18 16:24:46 +0100
commitd4088891e85b048fe42e7cfd5e9cf071ee66f1a7 (patch)
tree1efabcd6cf49cac83b6c62cb772dd37e7e8ec006 /cli/app/search
parentabc39afb44bec28f9c8f42c115b3f4578eb4c478 (diff)
parameter smoothing
Diffstat (limited to 'cli/app/search')
-rw-r--r--cli/app/search/live.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/cli/app/search/live.py b/cli/app/search/live.py
index 202203f..c12063b 100644
--- a/cli/app/search/live.py
+++ b/cli/app/search/live.py
@@ -240,15 +240,15 @@ class Interpolator:
z_sum = lerp_z.output + sin_z.output
# Latent - saturation
- saturation = InterpolatorParam(name='saturation', value=1.0)
+ saturation = InterpolatorParam(name='saturation', value=1.0, smooth=True)
z_abs = z_sum / tf.abs(z_sum) * saturation.variable
z_mix = LerpParam('saturation_mix', a_in=z_sum, b_in=z_abs, shape=[BATCH_SIZE, Z_DIM], datatype="input")
# Latent - disentangled vectors
- zoom = InterpolatorParam(name='zoom', value=0.0).variable * self.disentangled['zoom']
- shiftx = InterpolatorParam(name='shiftx', value=0.0).variable * self.disentangled['shiftx']
- shifty = InterpolatorParam(name='shifty', value=0.0).variable * self.disentangled['shifty']
- luminance = InterpolatorParam(name='luminance', value=0.0).variable * self.disentangled['luminance']
+ zoom = InterpolatorParam(name='zoom', value=0.0, smooth=True).variable * self.disentangled['zoom']
+ shiftx = InterpolatorParam(name='shiftx', value=0.0, smooth=True).variable * self.disentangled['shiftx']
+ shifty = InterpolatorParam(name='shifty', value=0.0, smooth=True).variable * self.disentangled['shifty']
+ luminance = InterpolatorParam(name='luminance', value=0.0, smooth=True).variable * self.disentangled['luminance']
disentangled = z_mix.output + zoom + shiftx + shifty + luminance
# Latent - stored vector
@@ -279,11 +279,10 @@ class Interpolator:
encoding_shape_np = tuple([1,] + encoding_shape[1:])
encoding_latent_placeholder = tf.constant(np.zeros(encoding_shape_np, dtype=np.float32))
- # encoding_stored = InterpolatorParam('encoding_stored', shape=encoding_shape_np, datatype="noise")
encoding_stored = LerpParam('encoding_stored', shape=encoding_shape_np, datatype="noise")
encoding_stored_sin = SinParam('encoding_orbit', shape=encoding_shape_np, datatype="noise", radius=0.05)
encoding_stored_sum = encoding_stored.output + encoding_stored_sin.output
- encoding_stored_mix = LerpParam('encoding_stored_mix', a_in=encoding_latent_placeholder, b_in=encoding_stored_sum, shape=encoding_shape_np, datatype="encoding", smooth=True)
+ encoding_stored_mix = LerpParam('encoding_stored_mix', a_in=encoding_latent_placeholder, b_in=encoding_stored_sum, shape=encoding_shape_np, datatype="encoding")
# Use the placeholder to redirect parts of the graph.
# - computed encoding goes into the encoding_mix