Michael Abbott
Michael Abbott
```julia julia> using Optimisers julia> mutable struct Two{T}; x::T; y::T; Two(x::T) where T = new{T}(x) end julia> Optimisers.trainable(z::Two) = (; z.x) julia> t = Two([1,2,3.]) Two{Vector{Float64}}([1.0, 2.0, 3.0], #undef) julia>...
Continuation of #56 , allows multiplication with OneHotMatrix on the left. All of these cases work: ``` julia> using OneHotArrays, JLArrays, LinearAlgebra, Test julia> for op1 in (identity, adjoint), op2...
This `y` is a little odd. Is the problem just that `show` lies about its type, or that the alias `OneHotVector` is overly specific? ```julia julia> x = onehotbatch(fill(2), 1:3)...
Closes #45 Needs attention from someone who uses CategoricalArrays?
First commit has a version of the `setindex!` method suggested at https://github.com/FluxML/OneHotArrays.jl/issues/6#issuecomment-1061893293, which works like this: ```julia julia> x = onehotbatch(1:3, 0:4) 5×3 OneHotMatrix(::Vector{UInt32}) with eltype Bool: ⋅ ⋅ ⋅...
Aims to fix https://github.com/FluxML/Zygote.jl/issues/1567 In rules defined by `@adjoint`, there is always a second method `back(::Nothing) = nothing`, so that the method you write need not allow for `nothing`. However,...
FIxes #1506 Needs tests
Originally: ```julia julia> using Flux julia> let e = Embedding(2=>2) x = Flux.onehotbatch([1 2; 2 1], 1:2) # x = Array(x) # similar error with Array or OneHotArray Flux.gradient(m ->...
First commit adds only those in `api.md`, but perhaps we should add more... like `Dual`? ```julia help?> ForwardDiff.Dual │ Warning │ │ The following bindings may be internal; they may...
As on slack, this: ```julia using Flux, Enzyme m = Chain(MultiHeadAttention(5; nheads=1), first) x = Flux.onehotbatch([1; 2; 3; 2;;], 1:5) Flux.logitcrossentropy(m(x), x) isa Float32 Enzyme.gradient(ReverseWithPrimal, m -> Flux.logitcrossentropy(m(x), x), m)...