Solved by ptrblck in post #2 
              
              
                Basically you could handle it like a 2-dimensional convolution with another “spatial” dimension. 
I.e. the target should contain the class indices without a channel dimension in the shape [batch_size, d, h, w]. 
I’ve created a small dummy example using a simple model to segment a square in the volum…