Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
no such method => modified function args (#16610)
Browse files Browse the repository at this point in the history
* no such method => modified function args

ERROR: MethodError: no method matching mapreduce(::getfield(MXNet.mx, Symbol("##8072#8073")), ::typeof(+), ::Float64, ::Array{NDArray{Float32,1},1})

* julia could not build package before

* Update julia/src/metric.jl

Co-Authored-By: Iblis Lin <[email protected]>
  • Loading branch information
2 people authored and marcoabreu committed Oct 30, 2019
1 parent 5aa74e0 commit 8e50fd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion julia/deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if Sys.isunix()
nvcc_path = Sys.which("nvcc")
if nvcc_path nothing
@info "Found nvcc: $nvcc_path"
push!(CUDAPATHS, replace(nvcc_path, "bin/nvcc", "lib64"))
push!(CUDAPATHS, replace(nvcc_path, "bin/nvcc" => "lib64"))
end
end

Expand Down
2 changes: 1 addition & 1 deletion julia/src/metric.jl
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ end

function get(metric::MSE)
# Delay copy until last possible moment
mse_sum = mapreduce(nda->copy(nda)[1], +, 0.0, metric.mse_sum)
mse_sum = mapreduce(nda->copy(nda)[1], +, metric.mse_sum; init = zero(MX_float))
[(:MSE, mse_sum / metric.n_sample)]
end

Expand Down

0 comments on commit 8e50fd9

Please sign in to comment.