Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 710 Bytes

getting_started.md

File metadata and controls

29 lines (21 loc) · 710 Bytes

Getting started

Let's look at a simple training example. In FluxTraining.jl, a Learner holds all state necessary for training. To get started, you need

First we define the necessary pieces:

model = ...
traindata, valdata = ...
lossfn = Flux.Losses.mse
opt = Flux.ADAM(0.01)

Then we construct a Learner:

learner = Learner(model, lossfn; data=(traindata, valdata))

And train for 10 epochs:

fit!(learner, 10)