Thanks – I understand that I can use matmul or dot to re-implement a specific use of batch_dot, with specific dimensions of the arguments and a specific axes=… parameter, but I am looking for something that either provides the equivalent function or some code that would automatically (efficiently) work in the same way for anything that the keras batch_dot function accepts, so that code for keras could get more efficiently converted to pytorch without the need to actually look at that specific use in detail.