I have 2 tensors X and Y - X has shape (20,4,300) and Y has shape(20,300) . How to perform multiplication such that I have an result of shape (20,4). The corresponding techinique in keras is
doc_product = Dot(axes=(2,1))([X,Y])
I would like to know how the same can be done in pytorch?