Michael Abbott

Results 1306 comments of Michael Abbott

A less complicated way to trigger this seems to be: ```julia julia> x |> summary # from above "5-element Vector{Float32}" julia> Zygote.gradient(loss, x) (Float32[0.711501, 0.9295027, 0.035282552, 0.9122769, 0.3412085],) julia> Zygote.gradient(loss,...

Can you post VERSION and `] st` for these errors? Often there are different ones e.g. on 1.10 and 1.11... I think `batched_mul` sometimes worked and sometimes complained, for me....

I don't know why this is unstable, the ways of Zygote are mysterious sometimes. The loss broadcasts this function, which contains odd things: `abs_error .< δ` is strange as these...

For testing purposes, would it be sufficient to overload `≈` instead? That would avoid hash complications, and maybe invalidations. Like here: https://github.com/JuliaDiff/Diffractor.jl/pull/73/files#diff-fba4d4a7c64aacd9b1a662bca4487f3e849b43f09e65f6c8788a3f142b989f65R27-R32

This syntax calls `typed_hcat`, and ideally there would be a rule for that in ChainRules.jl, probably a mild adaptation of the existing [rule for `hcat`](https://github.com/JuliaDiff/ChainRules.jl/blob/150c7a1d70cd40d1dc73d463ee641e199732e968/src/rulesets/Base/array.jl#L224): ```julia julia> Meta.@lower Float32[1 0...

Can reproduce. On Julia 1.10, a different error: ``` julia> gradient(f2, 1, 2, 3) ERROR: UndefRefError: access to undefined reference Stacktrace: [1] getindex @ ./essentials.jl:13 [inlined] [2] pop!(stk::Zygote.Stack{Any}) @ Zygote...

FWIW this is wrong with other GPUArrays too: ```julia julia> using JLArrays, Zygote julia> a = Float32.(1:9) 9-element Vector{Float32}: julia> a_gpu = a |> jl 9-element JLArray{Float32, 1}: julia> g3...

Maybe this should use `Dense(n, n, relu)`, as `gradient(sum, rand(Float32, 3))[1] isa Zygote.Fill` which I think gets you a generic `*` (but wouldn't happen in real use), while `gradient(x->sum(relu, x),...

Original from @skyleaworlder, care to review? PR needs tests. At present only `p=1,2` are tested, perhaps that's all that this was intended to support?

Where presumably you define something like: ``` julia> y = Flux.onehotbatch([1,2,3,1,2], 1:3) 3×5 OneHotMatrix(::Vector{UInt32}) with eltype Bool: 1 ⋅ ⋅ 1 ⋅ ⋅ 1 ⋅ ⋅ 1 ⋅ ⋅ 1...