Skip to content

Commit 7f90f38

Browse files
committed
requires fixes
1 parent ad047e1 commit 7f90f38

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/activation.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ const sigmoid = σ
1313

1414
σ(x::Float32) = σ_stable(x)
1515

16-
@require ForwardDiff begin
17-
import ForwardDiff: Dual
18-
σ(x::Dual{T,Float32}) where T = σ_stable(x)
16+
@require ForwardDiff="f6369f11-7733-5829-9624-2563aa707210" begin
17+
σ(x::ForwardDiff.Dual{T,Float32}) where T = σ_stable(x)
1918
end
2019

2120
"""

src/numeric.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,9 @@ log_fast(x::Union{Int32,Int64}) = log_fast(float(x))
8181

8282
# Derivatives
8383

84-
@require ForwardDiff begin
85-
import ForwardDiff: Dual, value, partials
86-
function log_fast(d::Dual{T,<:Union{Float32,Float64}}) where T
87-
x = value(d)
88-
Dual{T}(log_fast(x), inv(x) * partials(d))
84+
@require ForwardDiff="f6369f11-7733-5829-9624-2563aa707210" begin
85+
function log_fast(d::ForwardDiff.Dual{T,<:Union{Float32,Float64}}) where T
86+
x = ForwardDiff.value(d)
87+
Dual{T}(log_fast(x), inv(x) * ForwardDiff.partials(d))
8988
end
9089
end

0 commit comments

Comments
 (0)