torch.tensordot
torch.tensordot(a, b, dims=2, out=None)
Returns a contraction of a and b over multiple dimensions.
"tensordot" implements a generalized matrix product.
Parameters:
      * a (Tensor) -- Left tensor to contract
  * **b** (*Tensor*) -- Right tensor to contract

  * **dims** (*int** or **Tuple**[**List**[**int**]**,
    **List**[**int**]**] or **List**[**List**[**int**]**]
    **containing two lists** or **Tensor*) -- number of dimensions
    to contract or explicit lists of dimensions for "a" and "b"
    respectively

When called with a non-negative integer argument "dims" = d, and
   the number of dimensions of "a" and "b" is m and n, respectively,
   "tensordot()" computes
  r_{i_0,...,i_{m-d}, i_d,...,i_n}   = \sum_{k_0,...,k_{d-1}}
  a_{i_0,...,i_{m-d},k_0,...,k_{d-1}} \times b_{k_0,...,k_{d-1},
  i_d,...,i_n}.

When called with "dims" of the list form, the given dimensions will