Michael Abbott

Results 1143 comments of Michael Abbott

My MWE from the discourse thread is this: ```julia julia> using Flux, CUDA julia> let x = randn(3,5) |> cu y = Flux.onehotbatch("abcab", 'a':'c') |> cu Flux.dice_coeff_loss(x, y) # works...

This ought to work, and does for me. However, all things `Flux.params` are headed for extinction, see e.g. #2413. The current idiom for this is `Optimisers.trainables`... or in most cases,...

Can this have a test with input which triggers the NaN behaviour before? Ideally testing not just the function, but also LayerNorm, maybe BatchNorm, anything which uses this internally. Then...

That already exists, roughly: ```julia julia> model = Chain(Dense(2 => 1, tanh), Dense(1 => 1)); julia> st = Flux.state(model) (layers = ((weight = Float32[0.5213037 0.35699493], bias = Float32[0.0], σ =...

Here's the complete run-down on where Flux does & doesn't splat at present: ```julia julia> using Flux julia> pr(x) = begin println("arg: ", x); x end; julia> pr(x...) = begin...

Reading old threads... around here https://github.com/FluxML/Flux.jl/pull/2101#issuecomment-1306061980 it was agreed that adding `(c::Chain)(xs...) = c(xs)` would make sense, but there was never a PR. That's the first MethodError in my list...

Anyone remember why we allow `Parallel(hcat)`? You can write `Returns(hcat())` if you really want that... ```julia julia> Parallel(hcat)() Any[] julia> Parallel(hcat)(NaN) # ignores input, but this case is tested Any[]...

I put this on 0.15 milestone... I still think it's the right thing to do, but perhaps a breaking change is the right time to merge it.

There's some documentation here: http://fluxml.ai/Flux.jl/stable/gpu/#Selecting-GPU-backend Could always be better though. Support for anything but CUDA is a bit experimental. For me e.g. this model http://fluxml.ai/Flux.jl/stable/models/quickstart/ does not work on Metal,...

In case this helps, some variants. (Xref also https://github.com/JuliaLang/julia/issues/45454 recently about stack overflow from a splat.) ```julia julia> let x = Any[[1] for _ in 1:10^4] # x[2] = 2...