Skip to content
Snippets Groups Projects
Commit f9f81c2d authored by tomrink's avatar tomrink
Browse files

snapshot...

parent d1670735
No related branches found
No related tags found
No related merge requests found
...@@ -76,7 +76,7 @@ def preprocess_image(hr_image): ...@@ -76,7 +76,7 @@ def preprocess_image(hr_image):
return tf.expand_dims(hr_image, 0) return tf.expand_dims(hr_image, 0)
def run(in_file): def run(in_file, out_file):
# model = hub.load(SAVED_MODEL_PATH) # model = hub.load(SAVED_MODEL_PATH)
t0 = time.time() t0 = time.time()
hr_image = get_image(in_file) hr_image = get_image(in_file)
...@@ -90,4 +90,7 @@ def run(in_file): ...@@ -90,4 +90,7 @@ def run(in_file):
print('inference time: ', (t1-t0)) print('inference time: ', (t1-t0))
fake_image = tf.squeeze(fake_image) fake_image = tf.squeeze(fake_image)
return fake_image if out_file is not None:
\ No newline at end of file np.save(out_file, fake_image)
else:
return fake_image
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment