Search code examples
pythoncntk

CNTK 2 sorted minibatch sources


does anyone know how to create or use 2 minibatch sources or inputs a sorted way? My problem is the following:

I have images named from 0 to 5000 and images named 0_mask to 5000_mask. For each image x the coressponding image x_mask is the regression image for a deconvolution output. So i need a way to tell cntk that each x corresponds to x_match and that there is no regression done between x and y_mask.

I'm well aware of the cntk convolution sample. I've seen it. The problem are the two input streams with x and x_mask.

Can i combine them and make the reference, i need it in an easy way?

Thank you in advance.


Solution

  • You can create two minibatch sources, one for x and one for x_mask, both with randomize=False. Then the examples will be read in the order in which they are listed in the two map files. So as long as the map files are correct and the minibatch sizes are the same for both sources you will get the images and the masks in the order you want.