From 1b658a1b7cf4907e30d9c40376edfe5033d58845 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Thu, 20 Oct 2022 19:34:04 +0100 Subject: [PATCH] train-predict: can't destructure array when iterating generator ....it seems to lead to undefined behaviour or something --- aimodel/src/subcommands/train_predict.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aimodel/src/subcommands/train_predict.py b/aimodel/src/subcommands/train_predict.py index 52ea72d..d65daf7 100644 --- a/aimodel/src/subcommands/train_predict.py +++ b/aimodel/src/subcommands/train_predict.py @@ -92,7 +92,8 @@ def do_png(args, ai, dataset, model_code): i = 0 gen = batched_iterator(dataset, tensors_in_item=2, batch_size=model_params["batch_size"]) - for rainfall, water in gen: + for item in gen: + rainfall, water = item water_predict_batch = ai.embed(rainfall) for water_predict in water_predict_batch: # [ width, height, softmax_probabilities ] → [ batch, width, height ]