Solved by KFrank in post #2 
              
              
                Hi Stark! 

Flattening [64, 1, 128, 128] to [1, 1048576] mixes your batch 
dimension in with your image dimensions. 
Based on your comments and the comment in your code (rather than 
on my absent knowledge of the Dice score), it seems that the Dice 
score should be independent of how the image dimen…