Commit 998d2c23 authored by Christoph Sommer's avatar Christoph Sommer

fix bug that only first channel could be processed due to consumed generator

parent ee68323c
......@@ -297,8 +297,7 @@ def train_predict(n_tiles=(1,4,4), params=params, files=None, **unet_config):
else:
datagen.from_file_list(files)
imgs_for_patches = datagen.load_imgs_generator()
imgs_for_predict = datagen.load_imgs_generator()
with Timer('Training and Prediction'):
......@@ -307,6 +306,9 @@ def train_predict(n_tiles=(1,4,4), params=params, files=None, **unet_config):
for c in params["train_channels"]:
print(" -- Channel {}".format(c))
imgs_for_patches = datagen.load_imgs_generator()
imgs_for_predict = datagen.load_imgs_generator()
img_ch = (im[..., c:c+1] for im in imgs_for_patches)
img_ch_predict = (im[..., c:c+1] for im in imgs_for_predict)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment