Solved by ptrblck in post #2 
              
              
                Let’s walk through the code using your explanations: 
def get_predictions(output_batch):
    bs, c, h, w = output_batch.size()           # size returns [batchsize, channels, rows, columns]
    # Get's the underlying data. I would prefer to use .detach(), but that shouldn't be a problem here.
    ten…