Skip to content

Commit ba29c90

Browse files
authored
Update method docstrings (#607)
* Fix backtick * Update language highlight tags for fenced code samples * Update whitespace * Use TeX primitives * Update reference links * Remove duplicate backticks * Fix admonition block * Add backticks
1 parent 44a6b04 commit ba29c90

File tree

11 files changed

+46
-44
lines changed

11 files changed

+46
-44
lines changed

docs/src/reference.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ pad_zeros
7878

7979
`NNlib.conv` supports complex datatypes on CPU and CUDA devices.
8080

81-
!!! AMDGPU MIOpen supports only cross-correlation (flipkernel=true).
82-
Therefore for every regular convolution (flipkernel=false)
81+
!!! note "AMDGPU MIOpen supports only cross-correlation (`flipkernel=true`)."
82+
83+
Therefore for every regular convolution (`flipkernel=false`)
8384
kernel is flipped before calculation.
84-
For better performance, use cross-correlation (flipkernel=true)
85+
For better performance, use cross-correlation (`flipkernel=true`)
8586
and manually flip the kernel before `NNlib.conv` call.
8687
`Flux` handles this automatically, this is only required for direct calls.
8788

src/activations.jl

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The ascii name `sigmoid` is also exported.
3131
3232
See also [`sigmoid_fast`](@ref).
3333
34-
```
34+
```julia-repl
3535
julia> using UnicodePlots
3636
3737
julia> lineplot(sigmoid, -5, 5, height=7)
@@ -63,7 +63,7 @@ const sigmoid = σ
6363
6464
Piecewise linear approximation of [`sigmoid`](@ref).
6565
66-
```
66+
```julia-repl
6767
julia> lineplot(hardsigmoid, -5, 5, height=7)
6868
┌────────────────────────────────────────┐
6969
1 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⢀⡠⠖⠋⠉⠉⠉⠉⠉⠉⠉⠉│ hardσ(x)
@@ -102,7 +102,7 @@ const hardsigmoid = hardσ
102102
103103
Return `log(σ(x))` which is computed in a numerically stable way.
104104
105-
```
105+
```julia-repl
106106
julia> lineplot(logsigmoid, -5, 5, height=7)
107107
┌────────────────────────────────────────┐
108108
0 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡧⠤⠔⠒⠒⠒⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉│ logσ(x)
@@ -128,7 +128,7 @@ Segment-wise linear approximation of `tanh`, much cheaper to compute.
128128
See ["Large Scale Machine Learning"](https://ronan.collobert.com/pub/matos/2004_phdthesis_lip6.pdf).
129129
130130
See also [`tanh_fast`](@ref).
131-
```
131+
```julia-repl
132132
julia> lineplot(hardtanh, -2, 2, height=7)
133133
┌────────────────────────────────────────┐
134134
1 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⣀⠔⠋⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉│ hardtanh(x)
@@ -164,7 +164,7 @@ hardtanh(x) = clamp(x, oftype(x, -1), oftype(x, 1)) # clamp(x, -1, 1) is type-s
164164
[Rectified Linear Unit](https://en.wikipedia.org/wiki/Rectifier_(neural_networks))
165165
activation function.
166166
167-
```
167+
```julia-repl
168168
julia> lineplot(relu, -2, 2, height=7)
169169
┌────────────────────────────────────────┐
170170
2 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠔⠋│ relu(x)
@@ -188,7 +188,7 @@ Leaky [Rectified Linear Unit](https://en.wikipedia.org/wiki/Rectifier_(neural_ne
188188
activation function.
189189
You can also specify the coefficient explicitly, e.g. `leakyrelu(x, 0.01)`.
190190
191-
```julia
191+
```julia-repl
192192
julia> lineplot(x -> leakyrelu(x, 0.5), -2, 2, height=7)
193193
┌────────────────────────────────────────┐
194194
2 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠤⠒⠉│ #42(x)
@@ -220,7 +220,7 @@ const leakyrelu_a = 0.01 # also used in gradient below
220220
activation function capped at 6.
221221
See ["Convolutional Deep Belief Networks"](https://www.cs.toronto.edu/~kriz/conv-cifar10-aug2010.pdf) from CIFAR-10.
222222
223-
```
223+
```julia-repl
224224
julia> lineplot(relu6, -10, 10, height=7)
225225
┌────────────────────────────────────────┐
226226
6 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠎⠉⠉⠉⠉⠉⠉⠉⠉│ relu6(x)
@@ -245,7 +245,7 @@ Randomized Leaky Rectified Linear Unit activation function.
245245
See ["Empirical Evaluation of Rectified Activations"](https://arxiv.org/abs/1505.00853)
246246
You can also specify the bound explicitly, e.g. `rrelu(x, 0.0, 1.0)`.
247247
248-
```julia
248+
```julia-repl
249249
julia> lineplot(rrelu, -20, 10, height=7)
250250
┌────────────────────────────────────────┐
251251
10 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡤⠖⠋│ rrelu(x)
@@ -275,7 +275,7 @@ Exponential Linear Unit activation function.
275275
See ["Fast and Accurate Deep Network Learning by Exponential Linear Units"](https://arxiv.org/abs/1511.07289).
276276
You can also specify the coefficient explicitly, e.g. `elu(x, 1)`.
277277
278-
```
278+
```julia-repl
279279
julia> lineplot(elu, -2, 2, height=7)
280280
┌────────────────────────────────────────┐
281281
2 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠤⠒⠉│ elu(x)
@@ -305,7 +305,7 @@ deriv_elu(Ω, α=1) = ifelse(Ω ≥ 0, one(Ω), Ω + oftype(Ω, α))
305305
306306
Activation function from ["Gaussian Error Linear Units"](https://arxiv.org/abs/1606.08415).
307307
308-
```
308+
```julia-repl
309309
julia> lineplot(gelu, -2, 2, height=7)
310310
┌────────────────────────────────────────┐
311311
2 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠔⠊│ gelu(x)
@@ -363,7 +363,7 @@ end
363363
Self-gated activation function.
364364
See ["Swish: a Self-Gated Activation Function"](https://arxiv.org/abs/1710.05941).
365365
366-
```
366+
```julia-repl
367367
julia> lineplot(swish, -2, 2, height=7)
368368
┌────────────────────────────────────────┐
369369
2 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡤│ swish(x)
@@ -386,7 +386,7 @@ julia> lineplot(swish, -2, 2, height=7)
386386
Hard-Swish activation function.
387387
See ["Searching for MobileNetV3"](https://arxiv.org/abs/1905.02244).
388388
389-
```
389+
```julia-repl
390390
julia> lineplot(hardswish, -2, 5, height = 7)
391391
┌────────────────────────────────────────┐
392392
5 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡤⠔⠒⠉│ hardswish(x)
@@ -430,7 +430,7 @@ deriv_hardswish(x) = ifelse(x < -3, oftf(x,0), ifelse(x > 3, oftf(x,1), x/3 + of
430430
Activation function from
431431
["LiSHT: Non-Parametric Linearly Scaled Hyperbolic Tangent ..."](https://arxiv.org/abs/1901.05894)
432432
433-
```
433+
```julia-repl
434434
julia> lineplot(lisht, -2, 2, height=7)
435435
┌────────────────────────────────────────┐
436436
2 │⠢⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠔│ lisht(x)
@@ -469,7 +469,7 @@ lisht(x) = x * tanh_fast(x)
469469
Scaled exponential linear units.
470470
See ["Self-Normalizing Neural Networks"](https://arxiv.org/abs/1706.02515).
471471
472-
```
472+
```julia-repl
473473
julia> lineplot(selu, -3, 2, height=7)
474474
┌────────────────────────────────────────┐
475475
3 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ selu(x)
@@ -507,7 +507,7 @@ end
507507
508508
Activation function from ["Continuously Differentiable Exponential Linear Units"](https://arxiv.org/abs/1704.07483).
509509
510-
```
510+
```julia-repl
511511
julia> lineplot(celu, -2, 2, height=7)
512512
┌────────────────────────────────────────┐
513513
2 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠤⠒⠉│ celu(x)
@@ -535,7 +535,7 @@ deriv_celu(Ω, α=1) = ifelse(Ω > 0, oftf(Ω, 1), Ω / oftf(Ω, α) + 1)
535535
Threshold gated rectified linear activation function.
536536
See ["Zero-bias autoencoders and the benefits of co-adapting features"](https://arxiv.org/abs/1402.3337)
537537
538-
```
538+
```julia-repl
539539
julia> lineplot(trelu, -2, 4, height=7)
540540
┌────────────────────────────────────────┐
541541
4 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡤⠖⠋│ trelu(x)
@@ -559,7 +559,7 @@ const thresholdrelu = trelu
559559
560560
See ["Quadratic Polynomials Learn Better Image Features"](http://www.iro.umontreal.ca/~lisa/publications2/index.php/attachments/single/205) (2009).
561561
562-
```
562+
```julia-repl
563563
julia> lineplot(softsign, -5, 5, height=7)
564564
┌────────────────────────────────────────┐
565565
1 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⣀⠤⠤⠤⠤⠤│ softsign(x)
@@ -602,7 +602,7 @@ deriv_softsign(x) = 1 / (1 + abs(x))^2
602602
603603
See ["Deep Sparse Rectifier Neural Networks"](http://proceedings.mlr.press/v15/glorot11a/glorot11a.pdf), JMLR 2011.
604604
605-
```
605+
```julia-repl
606606
julia> lineplot(softplus, -3, 3, height=7)
607607
┌────────────────────────────────────────┐
608608
4 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ softplus(x)
@@ -640,7 +640,7 @@ softplus(x) = log1p(exp(-abs(x))) + relu(x)
640640
641641
Return `log(cosh(x))` which is computed in a numerically stable way.
642642
643-
```
643+
```julia-repl
644644
julia> lineplot(logcosh, -5, 5, height=7)
645645
┌────────────────────────────────────────┐
646646
5 │⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ logcosh(x)
@@ -664,7 +664,7 @@ const log2 = log(2)
664664
665665
Activation function from ["Mish: A Self Regularized Non-Monotonic Neural Activation Function"](https://arxiv.org/abs/1908.08681).
666666
667-
```
667+
```julia-repl
668668
julia> lineplot(mish, -5, 5, height=7)
669669
┌────────────────────────────────────────┐
670670
5 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠖⠋│ mish(x)
@@ -686,7 +686,7 @@ mish(x) = x * tanh(softplus(x))
686686
687687
See ["Tanhshrink Activation Function"](https://www.gabormelli.com/RKB/Tanhshrink_Activation_Function).
688688
689-
```
689+
```julia-repl
690690
julia> lineplot(tanhshrink, -3, 3, height=7)
691691
┌────────────────────────────────────────┐
692692
3 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ tanhshrink(x)
@@ -712,7 +712,7 @@ tanhshrink(x) = x - tanh_fast(x)
712712
713713
See ["Softshrink Activation Function"](https://www.gabormelli.com/RKB/Softshrink_Activation_Function).
714714
715-
```
715+
```julia-repl
716716
julia> lineplot(softshrink, -2, 2, height=7)
717717
┌────────────────────────────────────────┐
718718
2 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀│ softshrink(x)
@@ -770,7 +770,7 @@ For any other number types, it just calls `tanh`.
770770
771771
See also [`sigmoid_fast`](@ref).
772772
773-
```
773+
```julia-repl
774774
julia> tanh(0.5f0)
775775
0.46211717f0
776776
@@ -808,11 +808,11 @@ tanh_fast(x::Number) = Base.tanh(x)
808808
sigmoid_fast(x)
809809
810810
This is a faster, and very slightly less accurate, version of `sigmoid`.
811-
For `x::Float32, perhaps 3 times faster, and maximum errors 2 eps instead of 1.
811+
For `x::Float32`, perhaps 3 times faster, and maximum errors 2 eps instead of 1.
812812
813813
See also [`tanh_fast`](@ref).
814814
815-
```
815+
```julia-repl
816816
julia> sigmoid(0.2f0)
817817
0.54983395f0
818818

src/audio/mel.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
fmin::Float32 = 0f0, fmax::Float32 = Float32(sample_rate ÷ 2))
55
66
Create triangular Mel scale filter banks
7-
(ref: https://en.wikipedia.org/wiki/Mel_scale).
7+
(ref: [Mel scale - Wikipedia](https://en.wikipedia.org/wiki/Mel_scale)).
88
Each column is a filterbank that highlights its own frequency.
99
1010
# Arguments:

src/audio/stft.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
) where T <: Real
66
77
Hamming window function
8-
(ref: https://en.wikipedia.org/wiki/Window_function#Hann_and_Hamming_windows).
8+
(ref: [Window function § Hann and Hamming windows - Wikipedia](https://en.wikipedia.org/wiki/Window_function#Hann_and_Hamming_windows)).
99
Generalized version of `hann_window`.
1010
11-
``w[n] = \\alpha - \\beta cos(\\frac{2 \\pi n}{N - 1})``
11+
``w[n] = \\alpha - \\beta \\cos(\\frac{2 \\pi n}{N - 1})``
1212
1313
Where ``N`` is the window length.
1414
15-
```julia
15+
```julia-repl
1616
julia> lineplot(hamming_window(100); width=30, height=10)
1717
┌──────────────────────────────┐
1818
1 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠚⠉⠉⠉⠢⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
@@ -72,13 +72,13 @@ end
7272
) where T <: Real
7373
7474
Hann window function
75-
(ref: https://en.wikipedia.org/wiki/Window_function#Hann_and_Hamming_windows).
75+
(ref: [Window function § Hann and Hamming windows - Wikipedia](https://en.wikipedia.org/wiki/Window_function#Hann_and_Hamming_windows)).
7676
77-
``w[n] = \\frac{1}{2}[1 - cos(\\frac{2 \\pi n}{N - 1})]``
77+
``w[n] = \\frac{1}{2}[1 - \\cos(\\frac{2 \\pi n}{N - 1})]``
7878
7979
Where ``N`` is the window length.
8080
81-
```julia
81+
```julia-repl
8282
julia> lineplot(hann_window(100); width=30, height=10)
8383
┌──────────────────────────────┐
8484
1 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⠚⠉⠉⠉⠢⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
@@ -138,7 +138,7 @@ Short-time Fourier transform (STFT).
138138
The STFT computes the Fourier transform of short overlapping windows of the input,
139139
giving frequency components of the signal as they change over time.
140140
141-
``Y[\\omega, m] = \\sum_{k = 0}^{N - 1} \\text{window}[k] \\text{input}[m \\times \\text{hop length} + k] exp(-j \\frac{2 \\pi \\omega k}{\\text{n fft}})``
141+
``Y[\\omega, m] = \\sum_{k = 0}^{N - 1} \\text{window}[k] \\text{input}[m \\times \\text{hop length} + k] \\exp(-j \\frac{2 \\pi \\omega k}{\\text{n fft}})``
142142
143143
where ``N`` is the window length,
144144
``\\omega`` is the frequency ``0 \\le \\omega < \\text{n fft}``

src/ctc.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ function logaddexp(a, b)
2323
end
2424

2525
"""
26-
add_blanks(z)
26+
add_blanks(z)
27+
2728
Adds blanks to the start and end of `z`, and between items in `z`
2829
"""
2930
function add_blanks(z, blank)

src/dim_helpers/DepthwiseConvDims.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
DepthwiseConvDims
33
44
Concrete subclass of `ConvDims` for a depthwise convolution. Differs primarily due to
5-
characterization by C_in, C_mult, rather than C_in, C_out. Useful to be separate from
5+
characterization by `C_in`, `C_mult`, rather than `C_in`, `C_out`. Useful to be separate from
66
DenseConvDims primarily for channel calculation differences.
77
"""
88
struct DepthwiseConvDims{N, K, S, P, D} <: ConvDims{N}

src/dim_helpers/PoolDims.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
PoolDims(x_size::NTuple{M}, k::Union{NTuple{L, Int}, Int};
3-
stride=k, padding=0, dilation=1) where {M, L}
3+
stride=k, padding=0, dilation=1) where {M, L}
44
55
Dimensions for a "pooling" operation that can have an arbitrary input size, kernel size,
66
stride, dilation, and channel count. Used to dispatch onto efficient implementations at

src/dropout.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ i.e. each row of a matrix is either zero or not.
1212
Optional first argument is the random number generator used.
1313
1414
# Examples
15-
```
15+
```julia-repl
1616
julia> dropout(ones(2, 10), 0.2)
1717
2×10 Matrix{Float64}:
1818
1.25 1.25 0.0 1.25 1.25 1.25 1.25 1.25 1.25 1.25

src/pooling.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Perform mean pool operation with window size `k` on input tensor `x`.
162162
163163
Arguments:
164164
165-
* `x` and `k`: Expects `ndim(x) ∈ 3:5``, and always `length(k) == ndim(x) - 2`
165+
* `x` and `k`: Expects `ndim(x) ∈ 3:5`, and always `length(k) == ndim(x) - 2`
166166
* `pad`: See [`pad_zeros`](@ref) for details.
167167
* `stride`: Either a tuple with the same length as `k`, or one integer for all directions. Default is `k`.
168168
"""
@@ -182,7 +182,7 @@ This pooling operator from [Learned-Norm Pooling for Deep Feedforward and Recurr
182182
183183
Arguments:
184184
185-
* `x` and `k`: Expects `ndim(x) ∈ 3:5``, and always `length(k) == ndim(x) - 2`
185+
* `x` and `k`: Expects `ndim(x) ∈ 3:5`, and always `length(k) == ndim(x) - 2`
186186
* `p` is restricted to `0 < p < Inf`.
187187
* `pad`: See [`pad_zeros`](@ref) for details.
188188
* `stride`: Either a tuple with the same length as `k`, or one integer for all directions. Default is `k`.

src/softmax.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Note that, when used with Flux.jl, `softmax` must not be passed to layers like `
3939
which accept an activation function. The activation is broadcasted over the result,
4040
thus applies to individual numbers. But `softmax` always needs to see the whole column.
4141
42-
```julia
42+
```julia-repl
4343
julia> using Flux
4444
4545
julia> x = randn(Float32, 4, 4, 3, 13);

0 commit comments

Comments
 (0)