train Interface

interface

Interface for printing the network to file Interface for printing a summary of the network Interface for reading the network from a file Interface for reading network settings from a file Interface for reading optimiser settings from a file Interface for building network from ONNX nodes and initialisers Interface for adding a layer to the network Interface for resetting the network Interface for compiling the network Interface for setting batch size Interface for setting network metrics Interface for setting network loss method Interface for setting network accuracy method Interface for resetting state of recurrent layers Interface for saving input to network Interface for saving output to network Interface for training the network Interface for testing the network Interface for returning predicted results from supplied inputs using the trained network Interface for returning predicted results from supplied inputs using the trained network (graph input) Interface for updating the learnable parameters of the network based on gradients Interface for generating vertex order Interface for depth first search Interface for calculating root vertices Interface for calculating output vertices Interface for reducing two networks down to one (i.e. add two networks - parallel) Interface for copying a network Interface for getting number of learnable parameters in the network Interface for getting learnable parameters Interface for setting learnable parameters Interface for getting gradients of learnable parameters Interface for setting learnable parameter gradients Interface for resetting learnable parameter gradients Interface for forward pass


private module subroutine train(this, input, output, num_epochs, batch_size, plateau_threshold, shuffle_batches, batch_print_step, verbose, print_precision, scientific_print, early_stopping, val_input, val_output)

Arguments

Type IntentOptional Attributes Name
class(network_type), intent(inout) :: this

Instance of the network

class(*), intent(in), dimension(..) :: input

Input data

class(*), intent(in), dimension(:,:) :: output

Expected output data (data labels)

integer, intent(in) :: num_epochs

Number of epochs to train for

integer, intent(in), optional :: batch_size

Batch size (DEPRECATED)

real(kind=real32), intent(in), optional :: plateau_threshold

Threshold for checking learning plateau

logical, intent(in), optional :: shuffle_batches

Shuffle batch order

integer, intent(in), optional :: batch_print_step

Print step for batch

integer, intent(in), optional :: verbose

Verbosity level

integer, intent(in), optional :: print_precision

Number of decimal places to print for training metrics

logical, intent(in), optional :: scientific_print

Whether to print training metrics in scientific notation

logical, intent(in), optional :: early_stopping

Whether to stop training early if learning plateau is detected

class(*), intent(in), optional, dimension(..) :: val_input

Validation input data

class(*), intent(in), optional, dimension(:,:) :: val_output

Validation expected output data

Description

Train the network