Solved by tom in post #2 
              
              
                So under the hood, save_image does is lines of code: 



First it uses make_grid which will arrange a batch of tensors in a grid, giving you a c x h x w tensor even if you passed in b x c x h x w. You may or may not need this.
Then it maps from 0…1 to 0…255, clamps, permutes to h x w x  c and conver…