diff --git a/aimodel/src/lib/ai/RainfallWaterContraster.py b/aimodel/src/lib/ai/RainfallWaterContraster.py index e91793f..1d1998d 100644 --- a/aimodel/src/lib/ai/RainfallWaterContraster.py +++ b/aimodel/src/lib/ai/RainfallWaterContraster.py @@ -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 diff --git a/aimodel/src/subcommands/pretrain_predict.py b/aimodel/src/subcommands/pretrain_predict.py index 84fed70..62a74f5 100644 --- a/aimodel/src/subcommands/pretrain_predict.py +++ b/aimodel/src/subcommands/pretrain_predict.py @@ -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):