We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 609196a commit 85aa2faCopy full SHA for 85aa2fa
src/rulesets/Base/broadcast.jl
@@ -372,21 +372,6 @@ function unbroadcast(f::Function, df)
372
return sum(df)
373
end
374
375
-# Fallback
376
-
377
-function unbroadcast(x, dx)
378
- @info "last unbroadcast method!" x dx
379
- dx isa AbstractZero && return dx
380
- p = ProjectTo(x)
381
- if p isa ProjectTo{<:AbstractZero}
382
- return NoTangent()
383
- elseif Broadcast.broadcastable(x) isa Ref # then x is scalar under broadcast
384
- return p(sum(dx))
385
- else
386
- error("don't know how to handle broadcast gradient for x::$(typeof(x))")
387
- end
388
-end
389
390
#####
391
##### For testing
392
0 commit comments