Closed whilo closed 1 year ago
I don't think this is supported.
It's just broadcasting, C = R .* reshape(M, 2, 1, 5)
, which if you like index notation, TensorCast.jl will write for you. For simple things this is a relatively lightweight option, and complementary to TensorOperations.jl.
As indeed indicated by @mcabbott , this behaviour is not supported with TensorOperations.jl, which is more strict in the index notation it supports as compared to einsum and Tullio. As I don't think this will change in the short run, I will close this issue.
As a disclaimer, there might be a simple way to achieve this, I am not an expert in tensor contractions or
TensorOperations.jl
, but I could not find a solution easily. The following codethrows an error with "non-matching indices between left and right hand side: ..." here. The intention here is to not contract
t
on the right hand side (which is what I found the parser decides to do after inspecting its error condition), but to rather iterate over allt
and expand it inC
.torch.einsum
can handle this example as can Tullio.