tensorly.tenalg.tensordot

tensordot(tensor1, tensor2, modes, batched_modes=())[source]

Batched tensor contraction between two tensors on specified modes

Parameters:
tensor1tl.tensor
tensor2tl.tensor
modesint list or int

modes on which to contract tensor1 and tensor2

batched_modesint or tuple[int]
Returns:
contractiontensor1 contracted with tensor2 on the specified modes