introduction to pytorch the bmm function allows you perform batch-wise matrix multiplication for tensorsas illustrated in listing - listing - batch-wise matrix multiplication in [ ] torch ones( , , in [ ] out[ ]tensor([[[ ][ ]][[ ][ ]]]in [ ] shape out[ ]torch size([ ]in [ ] torch ones( , , in [ ] out[ ]tensor([[[ ][ ][ ]][[ ][ ][ ]]]in [ ] shape out[ ]torch size([ ]