mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-23 01:33:01 +00:00
train-predict: can't destructure array when iterating generator
....it seems to lead to undefined behaviour or something
This commit is contained in:
parent
aed2348a95
commit
1b658a1b7c
1 changed files with 2 additions and 1 deletions
|
@ -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 ]
|
||||||
|
|
Loading…
Reference in a new issue