We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I am trying to perform the following tensor contraction between tensors d,P,B,X.
enum {I,J,K,L,M,N}; Tensor<double,4,4> d; Tensor<double,4,3> P; Tensor<double,4,4> B; Tensor<double,4> X; d.random(); P.random(); B.random(); X.random();
The tensor contraction to be implemented is:
(1) The following fails in compilation.
auto dPBBXX2 = einsum<Index<K,M>,Index<L,N>,Index<K,I>,Index<L,J>,Index<I>,Index<J>>(d,P,B,B,X,X);
(2) However, the following code succeeds.
auto dPB = einsum<Index<K,M>,Index<L,N>,Index<K,I>>(d,P,B); auto dPBB = einsum<Index<M,L,N,I>,Index<L,J>>(dPB,B); auto dPBBXX = einsum<Index<M,N,I,J>,Index<I>,Index<J>>(dPBB,X,X); print("my 2D array", dPBBXX);
Conceptually, they should be equivalent, and (1) should be the preferred way as per the wiki.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I am trying to perform the following tensor contraction between tensors d,P,B,X.
The tensor contraction to be implemented is:
(1) The following fails in compilation.
(2) However, the following code succeeds.
Conceptually, they should be equivalent, and (1) should be the preferred way as per the wiki.
The text was updated successfully, but these errors were encountered: