summaryrefslogtreecommitdiff
path: root/cli/app/search
diff options
context:
space:
mode:
Diffstat (limited to 'cli/app/search')
-rw-r--r--cli/app/search/live.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/cli/app/search/live.py b/cli/app/search/live.py
index ca54a76..8e63fc5 100644
--- a/cli/app/search/live.py
+++ b/cli/app/search/live.py
@@ -100,8 +100,8 @@ class SinParam:
self.orbit_time = orbit_time
self.output = output
- def update(self, dt):
- self.orbit_time.value += self.orbit_speed.value / FPS * dt
+ def update(self):
+ self.orbit_time.value += self.orbit_speed.value / FPS
class LerpParam:
def __init__(self, name, shape, a_in=None, b_in=None, datatype="noise"):
@@ -135,9 +135,9 @@ class LerpParam:
else:
target_param.assign(target_value)
- def update(self, dt):
+ def update(self):
if self.direction != 0:
- self.n.value = clamp(self.n.value + self.direction * self.speed.value / FPS * dt)
+ self.n.value = clamp(self.n.value + self.direction * self.speed.value / FPS)
print("set_opt: {}_n {}".format(self.name, self.n.value))
if self.n.value == 0 or self.n.value == 1:
self.direction = 0
@@ -345,11 +345,11 @@ class Interpolator:
label_stored.b.assign(new_label)
encoding_stored_mix.switch()
- def on_step(self, i, dt, sess):
+ def on_step(self, i, sess):
for param in self.sin_params.values():
- param.update(dt)
+ param.update()
for param in self.lerp_params.values():
- param.update(dt)
+ param.update()
gen_images = sess.run(self.gen_img, feed_dict=self.get_feed_dict())
return gen_images
@@ -399,14 +399,13 @@ class Listener:
tag = "biggan_" + timestamp()
path_out = os.path.join(app_cfg.DIR_RESULTS, tag)
os.makedirs(path_out, exist_ok=True)
- dt = 1 / FPS
for i in range(99999):
if i == 0:
print("Loading network...")
elif i == 1:
print("Processing!")
gen_time = time.time()
- gen_images = interpolator.on_step(i, dt, self.sess)
+ gen_images = interpolator.on_step(i, self.sess)
if gen_images is None:
print("Exiting...")
break