Training on a 3D dataset with the smallest dimension being smaller than the patch size causes a negative range variable in N2VDataWrapper. See dimension of the tiles generated by N2V here.
In the example on the forum, the stack is 512x512x13 and the minimum patch size is 16. The tiles end up being 13x13x13, causing the range variable in the N2VDataWrapper to have negative dimensions. In turn, the exception is raised by Random.int() called on a negative number.
Originally raised here
Training on a 3D dataset with the smallest dimension being smaller than the patch size causes a negative range variable in N2VDataWrapper. See dimension of the tiles generated by N2V here.
In the example on the forum, the stack is 512x512x13 and the minimum patch size is 16. The tiles end up being 13x13x13, causing the range variable in the N2VDataWrapper to have negative dimensions. In turn, the exception is raised by Random.int() called on a negative number.