Solved by matthias.l in post #4 
              
              
                Ok, I think I got it. Most of the builtin torch modules support both: Single samples and batches as input out of the box.