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
In the following code, shouldn't grad be of the same type as x?
grad
x
julia> using ComponentArrays, Zygote julia> ps = ComponentArray(weight=rand(3,3)) ComponentVector{Float64}(weight = [0.8258011674811379 0.44981527211623784 0.5507199474580698; 0.28250960116858315 0.42697555461561054 0.22836834345488244; 0.9092739196971233 0.6566982028049392 0.14458718099508994]) julia> grad = Zygote.gradient(x->sum(x.weight), ps)[1] ComponentVector{Float64, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(weight = ViewAxis(1:9, ShapedAxis((3, 3), NamedTuple())),)}}}, Tuple{Axis{(weight = ViewAxis(1:9, ShapedAxis((3, 3), NamedTuple())),)}}}(weight = [1.0 1.0 1.0; 1.0 1.0 1.0; 1.0 1.0 1.0])
The text was updated successfully, but these errors were encountered:
Yeah, it should. That's weird. I might get a chance to look at it this weekend.
Sorry, something went wrong.
julia> ps = ComponentArray(weight=rand(3,3)) ComponentVector{Float64}(weight = [0.3364916316745368 0.16747972646975107 0.961114830406715; 0.7662896569815121 0.21684158229208028 0.8580540237329293; 0.13361739374272052 0.6107957888988388 0.27262419344861877]) julia> grad = Zygote.gradient(x->sum(x.weight), ps)[1] ComponentVector{Float64}(weight = [1.0 1.0 1.0; 1.0 1.0 1.0; 1.0 1.0 1.0])
This was fixed with the ProjectTo PR.
ProjectTo
No branches or pull requests
In the following code, shouldn't
grad
be of the same type asx
?The text was updated successfully, but these errors were encountered: