- observationsPostprocessors used as the current observation vector.
C++ Type:std::vector<PostprocessorName>
Unit:(no unit assumed)
Controllable:No
Description:Postprocessors used as the current observation vector.
- parametersControllable input parameters driven by the network.
C++ Type:std::vector<std::string>
Controllable:No
Description:Controllable input parameters driven by the network.
LibtorchNeuralNetControl
Controls the value of multiple controllable input parameters using a Libtorch-based neural network.
Overview
This object controls a physical process using a neural network. The neural network can be either read from a file of transferred from a trainer. One can use the "filename" parameter to load the neural network from file. This capability supports two formats:
Reading entire neural networks using a
TorchScriptformat in which case the user needs to specify "torch_script_format" parameter;Reading neural network parameters from a binary (usually
.net) file. In this case only parameters are read meaning that the structure of the neural network is not established in advance. For this reason, we need to specify the architecture using "num_neurons_per_layer" and "activation_function" parameters.
Input Parameters
- action_scaling_factorsPer-action scaling embedded in the controller outputs so saved checkpoints stay in physical units.
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:Per-action scaling embedded in the controller outputs so saved checkpoints stay in physical units.
- activation_functionrelu Activation name for each hidden layer, or one shared value for all layers.
Default:relu
C++ Type:std::vector<std::string>
Controllable:No
Description:Activation name for each hidden layer, or one shared value for all layers.
- depends_onThe Controls that this control relies upon (i.e. must execute before this one)
C++ Type:std::vector<std::string>
Controllable:No
Description:The Controls that this control relies upon (i.e. must execute before this one)
- execute_onINITIAL TIMESTEP_ENDThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
Default:INITIAL TIMESTEP_END
C++ Type:ExecFlagEnum
Controllable:No
Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
- filenameFile containing the controller network.
C++ Type:std::string
Controllable:No
Description:File containing the controller network.
- input_timesteps1Number of recent timesteps to stack into each network input.
Default:1
C++ Type:unsigned int
Range:1<=input_timesteps
Controllable:No
Description:Number of recent timesteps to stack into each network input.
- num_neurons_per_layerHidden-layer widths used when constructing the controller.
C++ Type:std::vector<unsigned int>
Controllable:No
Description:Hidden-layer widths used when constructing the controller.
- observation_scaling_factorsOptional multipliers applied after shifting the observation values.
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:Optional multipliers applied after shifting the observation values.
- observation_shift_factorsOptional offsets applied to the observation values before scaling.
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:Optional offsets applied to the observation values before scaling.
- torch_script_formatFalseWhether 'filename' is a TorchScript module to evaluate as-is. Otherwise, a network is built from 'num_neurons_per_layer' and 'activation_function', and only its parameters are read from the file.
Default:False
C++ Type:bool
Controllable:No
Description:Whether 'filename' is a TorchScript module to evaluate as-is. Otherwise, a network is built from 'num_neurons_per_layer' and 'activation_function', and only its parameters are read from the file.
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
Advanced Parameters
Input Files
Child Objects
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.