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

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.

Examples

Track accuracy:


			
			
			
			cb
			 
			=
			 
			

			Metrics
			(

	
			accuracy
			)

Pass in [ Metric]s:


			
			
			
			cb
			 
			=
			 
			

			Metrics
			(
			
    
			

	
			Metric
			(
			

	
			Flux
			.
			
			mse
			,
			 
			
			device
			 
			=
			 

	
			gpu
			)
			,
			
    
			

	
			Metric
			(
			

	
			Flux
			.
			
			mae
			,
			 
			
			device
			 
			=
			 

	
			gpu
			)
			

			)