mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-25 10:32:59 +00:00
ai: fix embed i/o
This commit is contained in:
parent
ed94da7492
commit
1e35802d2b
2 changed files with 2 additions and 2 deletions
|
@ -90,7 +90,7 @@ class RainfallWaterContraster(object):
|
|||
i_batch = -1
|
||||
for batch in batched_iterator(dataset, tensors_in_item=2, batch_size=self.batch_size):
|
||||
i_batch += 1
|
||||
rainfall = self.model_predict.predict(batch[0]) # ((rainfall, water), dummy_label)
|
||||
rainfall = self.model_predict(batch[0], training=False) # ((rainfall, water), dummy_label)
|
||||
|
||||
for step in tf.unstack(rainfall, axis=0):
|
||||
yield step
|
||||
|
|
|
@ -64,7 +64,7 @@ def run(args):
|
|||
|
||||
handle = sys.stdout
|
||||
if filepath_output != "-":
|
||||
handle = handle_open(filepath_output, "w")
|
||||
handle = handle_open(filepath_output, "wt" if filepath_output.endswith(".gz") else "w")
|
||||
|
||||
i = 0
|
||||
for rainfall in ai.embed(dataset):
|
||||
|
|
Loading…
Reference in a new issue