diff --git a/include/otbTensorflowSampler.hxx b/include/otbTensorflowSampler.hxx index 1a830c2b151ec7cc49c0fc2039afd70f26af8215..8c5d98970043ada5b5e617c5da19d6be62e93cea 100644 --- a/include/otbTensorflowSampler.hxx +++ b/include/otbTensorflowSampler.hxx @@ -187,7 +187,7 @@ TensorflowSampler<TInputImage, TVectorData> IndexType outIndex; outIndex[0] = 0; outIndex[1] = count * m_PatchSizes[i][1]; - RegionType region(outIndex, m_PatchSizes); + RegionType region(outIndex, m_PatchSizes[i]); IteratorType it(m_OutputPatchImages[i], region); for (it.GoToBegin(); !it.IsAtEnd(); ++it)