train-predict: can't destructure array when iterating generator

....it seems to lead to undefined behaviour or something
This commit is contained in:
Starbeamrainbowlabs 2022-10-20 19:34:04 +01:00
parent aed2348a95
commit 1b658a1b7c
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -92,7 +92,8 @@ def do_png(args, ai, dataset, model_code):
i = 0 i = 0
gen = batched_iterator(dataset, tensors_in_item=2, batch_size=model_params["batch_size"]) 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) water_predict_batch = ai.embed(rainfall)
for water_predict in water_predict_batch: for water_predict in water_predict_batch:
# [ width, height, softmax_probabilities ] → [ batch, width, height ] # [ width, height, softmax_probabilities ] → [ batch, width, height ]