Jutho / TensorOperations.jl

Julia package for tensor contractions and related operations
https://jutho.github.io/TensorOperations.jl/stable/
Other
443 stars 56 forks source link

Does TensorOperations.jl not support Zygote.jl? #126

Closed fuyangfeng closed 1 year ago

fuyangfeng commented 1 year ago
julia> using Zygote

julia> using TensorOperations

julia> function f(x) 
        @tensor b[i,k] := x[i,j]*x[j,k]
        sum(b)
        end
f (generic function with 1 method)

julia> a=rand(10,10);

julia> gradient(f,a)
ERROR: Can't differentiate gc_preserve_end expression $(Expr(:gc_preserve_end, %77)).
You might want to check the Zygote limitations documentation.
https://fluxml.ai/Zygote.jl/latest/limitations
vpuri3 commented 1 year ago

Just reran this example with 1.3.1. Same error. Is Zygote support a WIP? Thanks