How to apply a list of modules to a batch of data based on input

hi,
I have a list of modules of size (Dim2), and an input of the shape Batch_size X Dim1 X Dim2. I want to pass the data through the list of modules where I want the module[i] to be applied to input[:,:,i]. Is there a clean way to do this? preferably using broadcasting.
Thanks,

Would this work:

outputs = []
for m,i in zip(module,input.permute(2,0,1)):
  outputs.extend([m(i)])

broadcasting works for elementwise tensor arithmetic like add, multiply etc., i am not sure if it comes into play for passing inputs to functions.