Solved by pascal_notsawo in post #3 
              
              
                I think you can unsqueeze b so that a.dim() = b.dim() 

import torch

n, m, p = 100,5,2

a = torch.rand(n, m, p)

b = torch.rand(n, p)

b = b.unsqueeze(dim=1) # n x 1 x p

z=a/b