summaryrefslogtreecommitdiff
path: root/inversion/live.py
diff options
context:
space:
mode:
Diffstat (limited to 'inversion/live.py')
-rw-r--r--inversion/live.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/inversion/live.py b/inversion/live.py
index 8ad38a2..0fdad7c 100644
--- a/inversion/live.py
+++ b/inversion/live.py
@@ -15,14 +15,13 @@ from rpc import CortexRPC
from listener import Listener
from params import Params
-from params_opt import ParamsOpt
params = Params('params_dense.json')
-opt = ParamsOpt()
# --------------------------
# Make directories.
# --------------------------
+tag = "test"
OUTPUT_DIR = os.path.join('output', tag)
if not os.path.exists(OUTPUT_DIR):
os.makedirs(OUTPUT_DIR)
@@ -74,7 +73,7 @@ class InterpolatorParam:
def __init__(self, name, dtype=tf.float32, shape=(), value=None):
self.scalar = shape == ()
self.shape = shape
- self.value = np.zeros(shape) if value == None else
+ self.value = value or np.zeros(shape)
self.variable = tf.Variable(self.value, name=name, dtype=dtype, shape=shape)
def assign(value):
@@ -136,7 +135,7 @@ class Interpolator:
def run(cmd, payload):
# do things like create a new B and interpolate to it
- break
+ pass
class Listener:
def __init__(self):
@@ -161,7 +160,7 @@ class Listener:
self.rpc_client = rpc_client
self.rpc_client.send_status('processing', True)
for i in range(99999):
- gen_images = self.interpolator.on_step(i):
+ gen_images = self.interpolator.on_step(i)
if gen_images is None:
break
out_img = vs.data2pil(gen_images[0])