You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
In batch_dot, i.e, C = batch_dot(A, B), both inputs A & B must have ndim=3. However, in some cases our inputs could have have higher dimensionality. We can consider to support the following two cases:
Both A, B have ndim >3
We should compute the output as:
C[..., i, j] = sum_k (A[..., i, k] * B[..., k, j]), for all indices i, j.
For example, if the shape of A is (batch_size, a1, a2, …, b, c) and the shape of B is (batch_size, a1, a2, …, c, d), the shape of C will be (batch_size, a1, a2, ..., b, d).
This is similar to the matmul in Tensorflow
One of A, B have ndim > 3
Assume A.ndim >3, we have
C[b, ..., i, j] = sum_k (A[b, ..., i, k] * B[b, k, j]), for all indices i, j.