# No method matching loop\_einsum

**URL:** <https://discourse.julialang.org/t/no-method-matching-loop-einsum/71638>\
**Category:** Performance\
**Tags:** optim, zygote\
**Created:** [November 17, 2021, 8:44am UTC](https://discourse.julialang.org/t/no-method-matching-loop-einsum/71638 "2021-11-17T08:44:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![F-YF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/f-yf/32/17363_2.png) [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Post date:** [November 17, 2021, 8:44am UTC](https://discourse.julialang.org/t/no-method-matching-loop-einsum/71638/1 "2021-11-17T08:44:48Z")

</div>

How to deal with this when I used the Optim.jl and Zygote.jl packages for optimization, that the function used OMEinsum.jl.

```julia
ERROR: LoadError: MethodError: no method matching loop_einsum(::EinCode{((), (2, 1, 3)),(1, 2, 3)}, ::Tuple{Float64,Array{Float64,3}}, ::IndexSize{6,Int64})
Closest candidates are:
  loop_einsum(::EinCode{ixs,iy}, !Matched::Tuple{Vararg{AbstractArray{var"#s17",M} where var"#s17" where M,N}}, ::Any) where {N, T, ixs, iy}

```

---

<div class="post-metadata">

**Author:** ![goerch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerch/32/29122_2.png) [@goerch](https://discourse.julialang.org/u/goerch)\
**Post date:** [November 19, 2021, 10:58am UTC](https://discourse.julialang.org/t/no-method-matching-loop-einsum/71638/2 "2021-11-19T10:58:54Z")

</div>

Maybe you could show us some sample code? Otherwise we can only imagine your problem.
