Skip to content

Commit

Permalink
Added support for erf functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
denizyuret committed Oct 1, 2017
1 parent b97c273 commit 557ffbd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Knet v0.8.5 Release Notes
* Fixed memory leak with certain broadcast kernels.
* Fixed dropout efficiency bug introduced in 0.8.4.
* Fixed julia6 compat problem in examples/mnist.jl.
* Added conditional support for SpecialFunctions.


Knet v0.8.4 Release Notes
=========================
Expand Down
17 changes: 10 additions & 7 deletions src/unary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ unary_ops = [
"cospi",
# "cyl_bessel_i0",
# "cyl_bessel_i1",

# "erf", # Removed from base in julia6
# "erfc",
# "erfcinv",
# "erfcx",
# "erfinv",

"exp",
"exp10",
"exp2",
Expand Down Expand Up @@ -69,6 +62,16 @@ unary_ops = [
# "y1",
]

if VERSION < v"0.6.0" || Pkg.installed("SpecialFunctions") != nothing
append!(unary_ops, [
"erf", # Removed from base in julia6
"erfc",
"erfcinv",
"erfcx",
"erfinv",
])
end

function unary_op(f, j=f, o...)
J=broadcast_func(j)
for S in (32,64)
Expand Down

0 comments on commit 557ffbd

Please sign in to comment.