Skip to content

Commit bf027df

Browse files
Merge pull request #190 from matsueushi/docs
Improve docs
2 parents 2d71e2a + 219201d commit bf027df

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/activation.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ const sigmoid = σ
2323
end
2424

2525
"""
26-
hardσ(x, a=0.2) = max(0, min(1.0, a * x + 0.5))
26+
hardσ(x, a=0.2) = max(0, min(1.0, a * x + 0.5))
2727
28-
Segment-wise linear approximation of sigmoid
29-
See: [BinaryConnect: Training Deep Neural Networks withbinary weights during propagations](https://arxiv.org/pdf/1511.00363.pdf)
28+
Segment-wise linear approximation of sigmoid.
29+
See [BinaryConnect: Training Deep Neural Networks withbinary weights during propagations](https://arxiv.org/pdf/1511.00363.pdf).
3030
"""
3131
hardσ(x::Real, a=0.2) = oftype(x/1, max(zero(x/1), min(one(x/1), oftype(x/1,a) * x + oftype(x/1,0.5))))
3232
const hardsigmoid = hardσ
@@ -53,7 +53,7 @@ const logsigmoid = logσ
5353
hardtanh(x) = max(-1, min(1, x))
5454
5555
Segment-wise linear approximation of tanh. Cheaper and more computational efficient version of tanh.
56-
See: (http://ronan.collobert.org/pub/matos/2004_phdthesis_lip6.pdf)
56+
See [Large Scale Machine Learning](http://ronan.collobert.org/pub/matos/2004_phdthesis_lip6.pdf).
5757
"""
5858
hardtanh(x::Real) = max(-one(x), min( one(x), x))
5959

@@ -137,7 +137,7 @@ swish(x::Real) = x * σ(x)
137137
"""
138138
lisht(x) = x * tanh(x)
139139
140-
Non-Parametric Linearly Scaled Hyperbolic Tangent Activation Function
140+
Non-Parametric Linearly Scaled Hyperbolic Tangent Activation Function.
141141
See [LiSHT](https://arxiv.org/abs/1901.05894)
142142
"""
143143
lisht(x::Real) = x * tanh(x)
@@ -171,7 +171,7 @@ celu(x::Real, α::Real = one(x)) = ifelse(x ≥ 0, x / one(x), α * (exp(x/α) -
171171
"""
172172
trelu(x, theta = 1.0) = x > theta ? x : 0
173173
174-
Threshold Gated Rectified Linear
174+
Threshold Gated Rectified Linear.
175175
See [ThresholdRelu](https://arxiv.org/pdf/1402.3337.pdf)
176176
"""
177177
trelu(x::Real,theta = one(x)) = ifelse(x> theta, x, zero(x))
@@ -205,23 +205,23 @@ logcosh(x::Real) = x + softplus(-2x) - log(oftype(x, 2))
205205
"""
206206
mish(x) = x * tanh(softplus(x))
207207
208-
Self Regularized Non-Monotonic Neural Activation Function
208+
Self Regularized Non-Monotonic Neural Activation Function.
209209
See [Mish: A Self Regularized Non-Monotonic Neural Activation Function](https://arxiv.org/abs/1908.08681).
210210
"""
211211
mish(x::Real) = x * tanh(softplus(x))
212212

213213
"""
214214
tanhshrink(x) = x - tanh(x)
215215
216-
See [Tanhshrink Activation Function](https://www.gabormelli.com/RKB/Tanhshrink_Activation_Function)
216+
See [Tanhshrink Activation Function](https://www.gabormelli.com/RKB/Tanhshrink_Activation_Function).
217217
"""
218218
tanhshrink(x::Real) = x - tanh(x)
219219

220220
"""
221221
softshrink(x, λ=0.5) =
222222
(x ≥ λ ? x - λ : (-λ ≥ x ? x + λ : 0))
223223
224-
See [Softshrink Activation Function](https://www.gabormelli.com/RKB/Softshrink_Activation_Function)
224+
See [Softshrink Activation Function](https://www.gabormelli.com/RKB/Softshrink_Activation_Function).
225225
"""
226226
softshrink(x::Real, λ = oftype(x/1, 0.5)) = min(max(zero(x), x - λ), x + λ)
227227

src/batched/batchedadjtrans.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ as it operated on such matrix slices of an array with `ndims(A)==3`.
1313
BatchedTranspose{T, N, S} <: AbstractBatchedMatrix{T, N}
1414
BatchedAdjoint{T, N, S}
1515
16-
Lazy wrappers analogous to `Transpose` and `Adjoint`, returned by `batched_transpose`
16+
Lazy wrappers analogous to `Transpose` and `Adjoint`, returned by `batched_transpose`.
1717
"""
1818

1919
@doc _batched_doc

0 commit comments

Comments
 (0)