TensorFlow `matmul` equivalent in Julia: matrix multiplication with two given tensor dimensions

I think this functionality is available in OMEinsum and (possibly without the derivs) in TensorOperations. Both packages need specifying the dimensions explicitly, though.