Skip to content

Commit 0c7bdb9

Browse files
committed
Minor typos
1 parent 0a7f42a commit 0c7bdb9

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/losses/functions.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ end
393393
Return how much the predicted distribution `ŷ` diverges from the expected Poisson
394394
distribution `y`; calculated as -
395395
396-
`sum(ŷ .- y .* log.(ŷ)) / size(y, 2)`.
396+
sum(ŷ .- y .* log.(ŷ)) / size(y, 2)
397397
398398
[More information.](https://peltarion.com/knowledge-center/documentation/modeling-view/build-an-ai-model/loss-functions/poisson).
399399
@@ -416,7 +416,7 @@ end
416416
Return the [hinge_loss](https://en.wikipedia.org/wiki/Hinge_loss) given the
417417
prediction `ŷ` and true labels `y` (containing 1 or -1); calculated as
418418
419-
`sum(max.(0, 1 .- ŷ .* y)) / size(y, 2)`.
419+
sum(max.(0, 1 .- ŷ .* y)) / size(y, 2)
420420
421421
Usually used with classifiers like Support Vector Machines.
422422
See also: [`squared_hinge_loss`](@ref)
@@ -451,7 +451,7 @@ end
451451
Return the squared hinge_loss loss given the prediction `ŷ` and true labels `y`
452452
(containing 1 or -1); calculated as
453453
454-
`sum((max.(0, 1 .- ŷ .* y)).^2) / size(y, 2)`.
454+
sum((max.(0, 1 .- ŷ .* y)).^2) / size(y, 2)
455455
456456
Usually used with classifiers like Support Vector Machines.
457457
See also: [`hinge_loss`](@ref)

src/utils.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,6 @@ julia> a = Flux.throttle(() -> println("Flux"), 2);
533533
julia> a()
534534
Flux
535535
536-
julia> a()
537-
Flux
538-
539536
julia> for i = 1:4 # sleeps for 1 second -> the function can be called in alternate iterations
540537
a()
541538
sleep(1)
@@ -551,7 +548,6 @@ Flux
551548
Flux
552549
Flux
553550
Flux
554-
555551
```
556552
"""
557553
function throttle(f, timeout; leading=true, trailing=false)

0 commit comments

Comments
 (0)