Michael Abbott

Results 1143 comments of Michael Abbott

> would it make sense to add a sentence like "This function is type-unstable." to the docstring of `setup`? Yes, probably. Also to emphasise that the way to deal with...

One option would be to add `Base.@kwdef`: ```julia julia> Base.@kwdef struct Nesterov{T} eta::T = 1f-3 rho::T = 9f-1 end julia> Nesterov(rho = 0.9) ERROR: MethodError: no method matching Nesterov(::Float32, ::Float64)...

I think the story here is that Restructure makes a new copy of the model, which allocates, and this costs about 30μs: ```julia julia> @btime $re($params); # This is the...

Changing that line to use a view would probably work fine. ProjectTo won't mind, but I'm not sure whether all operations downstream will be happy with a reshaped view (e.g....

Sadly this still doesn't work after tagging 0.2. Does anything look wrong to you, @logankilpatrick?

Thanks, that's a bug. It does work on Flux master BTW, as we changed Chain not to have children which aren't fields. But `destructure` ought to still allow such things....

That's possible. But `x |> f` normally returns a value... the operation seems more like `f ∘ g` in that it returns another object like `f`. In fact Chain is...

One problem with `∘` is that the order is backwards. OptimiserChain matches Flux.Chain in putting the first operation leftmost. We could literally use `Flux.Chain` by moving the `struct Chain` here,...

The only other vararg infix operator is `++`. Although it isn't a big deal to digest things like `:(1 => 2 => 3)`, indeed `:(sin ∘ cos ∘ tan)` is...

Building in two distinct names to allow someone to write `using Optimisers: chain` and afterwards save a few chars doesn't seem great. The nice thing about infix syntax like `WeightDecay()...