Closed ekinakyurek closed 6 years ago
Note that even without any dims
argument, this PR and master
are type unstable for mean
, while on Julia 0.6 it correctly returns an Array{Float32,2}
:
julia> x = rand(Float32,2,3);
julia> grad(x->x[1])(x)
2×3 Array{Float32,2}:
1.0 0.0 0.0
0.0 0.0 0.0
julia> grad(x->mean(x))(x)
2×3 Array{Float64,2}:
0.166667 0.166667 0.166667
0.166667 0.166667 0.166667
Can you explain this PR? Do you now why the tests are failing?