LibtorchANNTrainer
Overview
This trainer is dedicated to train a LibtorchArtificialNeuralNet. For a detailed description of the neural network trained by this object, visit LibtorchArtificialNeuralNet. The user can customize the neural network in the trainer, however the optimization algorithm is hardcoded to be Adam.
Example Input File Syntax
Let us try to approximate the following function: over the domain. For this, we select points using a tensor product grid as follows:
(contrib/moose/modules/stochastic_tools/test/tests/surrogates/libtorch_nn/train.i)Following this, the function is evaluated using a vector postprocessor:
(contrib/moose/modules/stochastic_tools/test/tests/surrogates/libtorch_nn/train.i)Once this is done, the corresponding inputs (from the sampler) and outputs (from the postprocessor) are handed to the neural net trainer to optimize the weights:
(contrib/moose/modules/stochastic_tools/test/tests/surrogates/libtorch_nn/train.i)The detailed documentation of this object is only available when Moose is compiled with Libtorch. For instructions on how to compile Moose with Libtorch, visit the general installation webpage or click here.