Einsum

Description

The Einsum operator uses the Einstein summation convention to evaluate the algebraic tensor operation on the tensor sequence. The formula string contains a sequence of lowercase letters separated by commas (,). Each item corresponds to an operand tensor, and the characters in the item correspond to the operand dimension.

Input

1 to ∞ inputs:

x: tensor of type float16, float, or int32.

Output

One output:

y: tensor of type float16, float, or int32.

Property

equation: subscript of Einstein summation, which is a summation expression string.

Constraints

Currently, ONNX Einsum supports only 20 dual-input cases:

"abc,cde->abde","abc,cde->abde","abcd,aecd->aceb","abcd,adbe->acbe","abcd,cde->abe","abc,cd->abd","abc,dc->abd","abc,abd->dc","abc,dec->abde","abc,abde->dec","abcd,aecd->acbe","abcd,acbe->aecd","abcd,ecd->abe","abcd,abe->ecd","abcd,acbe->adbe","abcd,abde->abce","abcd,abce->abde","abcd,aebd->aebc","abcd,abce->acde","abc,abd->acd","ab,cb->ac".

ONNX Opset Support

Supported ONNX version Opset v12/v13/v14/v15/v16/v17/v18