SliceMap.jl
SliceMap.jl copied to clipboard
Same-same but different
This pull request changes the compat entry for the `JuliennedArrays` package from `0.3` to `0.3, 0.4`. This keeps the compat entries for earlier versions. Note: I have not tested your...
The implementation of slicemap and mapcols is fundamentally different. Intuitively, this is relatively weird because `mapcols(f,M)=slicemap(f,M,dims=1)` and `slicemap(f,M,dims=1)=reshape(mapcols(f,reshape(M,size(M,1),:)),size(M))` (if `dims` is not equal to 1, then one could just use...
```julia julia> using SliceMap, Flux julia> mapcols(norm, gpu(Flux.param(randn(2,2)))) Tracked 1×2 Array{Float32,2}: 1.98362 0.443408 julia> mapcols(norm, gpu(randn(2,2))) 1×2 Array{Float32,2}: 0.891582 3.15292 ``` Possibly because norm returns a scalar?
This is a problem since the code below will not run on the GPU (unless one allows scalar operations which is not ideal) ```julia julia> using SliceMap, Flux julia> slicemap(norm,...