Michael Abbott

Results 222 issues of Michael Abbott

Something is insufficiently recursive -- it writes `eachindex(first(vvv))` and then `eachindex(first(vvv[c]))`: ```julia julia> vvv = [[rand(4) for b in 1:5] for c in 1:6]; summary(vvv) "6-element Vector{Vector{Vector{Float64}}}" julia> using Tullio...

parsing

From https://discourse.julialang.org/t/fast-4d-argmax/58566, why does this make an `Array{Any,3}`? ```julia julia> using Tullio julia> fun((i,x), (j,y)) = ifelse(x>y, (i,x), (j,y)); julia> findmax4Dt(A) = @tullio (fun) out[i,j,k] := (z, A[i,j,k,z]) init =...

``` julia> using Tracker, Zygote, Tullio, LinearAlgebra julia> function gg(x) res = 0.0 n = [norm(x)] for i in 1:100 res += @tullio res_ := sin(exp(x[j]) - n[1]) end atan(res)...

From here: https://discourse.julialang.org/t/increment-elements-of-array-by-index/49694/5 Tullio was detecting that `i` is unsafe to multi-thread, but wasn't passing this to KernelAbstractions: ```julia using CUDA, Tullio, KernelAbstractions let A = CUDA.zeros(4), I = cu([1,3,1]),...

Sometimes it would be neat if the same function could allow for several dimensionalities. Perhaps this is written: ```julia f(A, B) = @tullio C[i, j, ..] := A[i, k, ..]...

Somewhat unexpectedly, some `mapslices`-like things already work: ```julia julia> f(scalar, row, num) = sum(row .+ num)/scalar; julia> s = 2; m = rand(Int8, 4,4); a = rand(1:9, 4); julia> @tullio...

Closes #567, perhaps in the minimal way, by attaching these rules to internal function which take positional arguments. Gradient for `init` is just `@not_implemented` for now. One nice effect is...

This uses the `RuleConfig{>:HasReverseMode}` story to call back into AD to write a rule for `maximum(f, xs)`. It's much simplified from the first attempt: * On julia 1.7+, for a...

Requested here: https://discourse.julialang.org/t/implementation-of-spectral-normalization-for-machine-learning/76074 The workaround is to call `svd(X).S`, which is slower forwards. But it looks like the gradient calculation with something like `svd_rev((; U=NoTangent(), s=s, V=NoTangnet(), Vt=NoTangent()), NoTangent(), S̄,...

missing rule

The original function is more flexible: ```julia julia> sortslices(rand(2,2,2); dims=(1,2)); julia> rrule(sortslices, rand(2,2,2); dims=(1,2)); ERROR: TypeError: in keyword argument dims, expected Integer, got a value of type Tuple{Int64, Int64} Stacktrace:...