Skip to content

Commit 70242cb

Browse files
committed
fix tests
1 parent f38628d commit 70242cb

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

NEWS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## v0.13.7
44
* Added [`@autosize` macro](https://github.com/FluxML/Flux.jl/pull/2078)
5-
* New method of `train!` using Zygote's "explicit" mode, allows changing AD back-end.
5+
* New method of `train!` using Zygote's "explicit" mode. Part of a move away from "implicit" `Params`.
66

77
## v0.13.4
88
* Added [`PairwiseFusion` layer](https://github.com/FluxML/Flux.jl/pull/1983)

docs/make.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
using Documenter, Flux, NNlib, Functors, MLUtils, BSON, Optimisers, OneHotArrays, Zygote, ChainRulesCore
1+
using Documenter, Flux, NNlib, Functors, MLUtils, BSON, Optimisers, OneHotArrays, Zygote, ChainRulesCore, Statistics
22

33

44
DocMeta.setdocmeta!(Flux, :DocTestSetup, :(using Flux); recursive = true)
55

66
makedocs(
7-
modules = [Flux, NNlib, Functors, MLUtils, BSON, Optimisers, OneHotArrays, Zygote, ChainRulesCore, Base],
7+
modules = [Flux, NNlib, Functors, MLUtils, BSON, Optimisers, OneHotArrays, Zygote, ChainRulesCore, Base, Statistics],
88
doctest = false,
99
sitename = "Flux",
1010
# strict = [:cross_references,],

docs/src/models/overview.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This example will predict the output of the function `4x + 2`. Making such predi
1717

1818
First, import `Flux` and define the function we want to simulate:
1919

20-
```jldoctest overview
20+
```jldoctest overview setup = :(using Statistics)
2121
julia> using Flux
2222
2323
julia> actual(x) = 4x + 2
@@ -77,13 +77,13 @@ julia> predict(x_train)
7777
In order to make better predictions, you'll need to provide a *loss function* to tell Flux how to objectively *evaluate* the quality of a prediction. Loss functions compute the cumulative distance between actual values and predictions.
7878

7979
```jldoctest overview; filter = r"[+-]?([0-9]*[.])?[0-9]+(f[+-]*[0-9])?"
80-
julia> loss(model, x, y) = mean(abs2.(model(x) .- y));
80+
julia> loss(model, x, y) = Statistics.mean(abs2.(model(x) .- y));
8181
8282
julia> loss(predict, x_train, y_train)
8383
122.64734f0
8484
```
8585

86-
More accurate predictions will yield a lower loss. You can write your own loss functions or rely on those already provided by Flux. This loss function is called [mean squared error](https://www.statisticshowto.com/probability-and-statistics/statistics-definitions/mean-squared-error/). Flux works by iteratively reducing the loss through *training*.
86+
More accurate predictions will yield a lower loss. You can write your own loss functions or rely on those already provided by Flux. This loss function is called [mean squared error](https://www.statisticshowto.com/probability-and-statistics/statistics-definitions/mean-squared-error/) (and built-in as [`mse`](@ref Flux.Losses.mse)). Flux works by iteratively reducing the loss through *training*.
8787

8888
## 3. Improve the Prediction
8989

0 commit comments

Comments
 (0)