Metrics
struct defined in module
FluxTraining
Metrics(metrics...) <: Callback
Callback that tracks metrics during training.
You can pass any number of
metrics with every argument being
an
AbstractMetric like
Metric; or
a function
f(ŷs, ys) -> val
This callback is added by default to every
Learner unless you pass in
usedefaultcallbacks = false. A metric tracking
learner.lossfn
Loss is included by default.
The computed metrics can be access in
learner.cbstate.metricsstep and
learner.cbstate.metricsepoch for steps and epochs, respectively.
Track
accuracy:
cb
=
Metrics
(
accuracy
)
Pass in [
Metric]s:
cb
=
Metrics
(
Metric
(
Flux
.
mse
,
device
=
gpu
)
,
Metric
(
Flux
.
mae
,
device
=
gpu
)
)There is
1
method for FluxTraining.Metrics:
The following pages link back here:
How to log to TensorBoard, How to train a model, Introduction, Quickstart, Saving and loading models for inference, Siamese image similarity, Tabular Classification, TimeSeries Classification, fastai API comparison
FluxTraining.jl , callbacks/callbacks.jl , callbacks/earlystopping.jl , callbacks/metrics.jl , learner.jl