Thank you so much for your quick response @111414 .
I am sorry I did not describe it clearly.
I actually want the dim1 of mat1 as weights to integrate mat2 along dim0 of mat2, then I will get a matrix (batch, 36,36).
Like
mat1: batchxn1,
mat2: n1xn2xn3,
then mat1*mat2 → batchxn2xn3.