You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using JLD2, FileIO, Flux, Mill
@load "weird_node.jld2" x1 y
model = reflectinmodel(x1, d -> Chain(Dense(d, settings.k, relu),),
d -> SegmentedMeanMax(d),
b = Dict("" => d -> Chain(Dense(d, 2),)))
ps = Flux.params(model)
loss = (model, x, y) -> Flux.logitcrossentropy(model(x).data,y)
loss(model, x1,y)
Flux.logitcrossentropy(model(x1).data,y)
gradient(() -> loss(model, x1,y), ps)
with error ERROR: MethodError: no method matching zero(::Type{Any}) Closest candidates are: zero(::Type{Union{Missing, T}}) where T at missing.jl:105 zero(::Type{Missing}) at missing.jl:103 zero(::Type{LibGit2.GitHash}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\LibGit2\src\oid.jl:220
The text was updated successfully, but these errors were encountered:
This is most probably because Flux fails when computing gradient of sparse input when the model contains standard dense matrices. See here FluxML/Flux.jl#965
The gradient computation crashes on following code, using following data:
https://ufile.io/8wl0eit1
with error
ERROR: MethodError: no method matching zero(::Type{Any}) Closest candidates are: zero(::Type{Union{Missing, T}}) where T at missing.jl:105 zero(::Type{Missing}) at missing.jl:103 zero(::Type{LibGit2.GitHash}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\LibGit2\src\oid.jl:220
The text was updated successfully, but these errors were encountered: