#include <LibtorchANNSurrogate.h>
Public Types | |
typedef DataFileName | DataFileParameterType |
Public Member Functions | |
LibtorchANNSurrogate (const InputParameters ¶meters) | |
virtual Real | evaluate (const std::vector< Real > &x) const override |
Evaluate surrogate model given a row of parameters. More... | |
virtual Real | evaluate (const std::vector< Real > &x) const |
Evaluate surrogate model given a row of parameters. More... | |
virtual void | evaluate (const std::vector< Real > &x, std::vector< Real > &y) const |
Various evaluate methods that can be overriden. More... | |
virtual Real | evaluate (const std::vector< Real > &x, Real &std) const |
Evaluate methods that also return predicted standard deviation (see GaussianProcess.h) More... | |
virtual void | evaluate (const std::vector< Real > &x, std::vector< Real > &y, std::vector< Real > &) const |
virtual bool | enabled () const |
std::shared_ptr< MooseObject > | getSharedPtr () |
std::shared_ptr< const MooseObject > | getSharedPtr () const |
MooseApp & | getMooseApp () const |
const std::string & | type () const |
const std::string & | name () const |
std::string | typeAndName () const |
MooseObjectParameterName | uniqueParameterName (const std::string ¶meter_name) const |
MooseObjectName | uniqueName () const |
const InputParameters & | parameters () const |
const hit::Node * | getHitNode () const |
bool | hasBase () const |
const std::string & | getBase () const |
const T & | getParam (const std::string &name) const |
std::vector< std::pair< T1, T2 > > | getParam (const std::string ¶m1, const std::string ¶m2) const |
const T * | queryParam (const std::string &name) const |
const T & | getRenamedParam (const std::string &old_name, const std::string &new_name) const |
T | getCheckedPointerParam (const std::string &name, const std::string &error_string="") const |
bool | isParamValid (const std::string &name) const |
bool | isParamSetByUser (const std::string &name) const |
void | connectControllableParams (const std::string ¶meter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const |
void | paramError (const std::string ¶m, Args... args) const |
void | paramWarning (const std::string ¶m, Args... args) const |
void | paramInfo (const std::string ¶m, Args... args) const |
std::string | messagePrefix (const bool hit_prefix=true) const |
std::string | errorPrefix (const std::string &) const |
void | mooseError (Args &&... args) const |
void | mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const |
void | mooseErrorNonPrefixed (Args &&... args) const |
void | mooseWarning (Args &&... args) const |
void | mooseWarningNonPrefixed (Args &&... args) const |
void | mooseDeprecated (Args &&... args) const |
void | mooseInfo (Args &&... args) const |
void | callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr) const |
std::string | getDataFileName (const std::string ¶m) const |
std::string | getDataFileNameByName (const std::string &relative_path) const |
std::string | getDataFilePath (const std::string &relative_path) const |
const Parallel::Communicator & | comm () const |
processor_id_type | n_processors () const |
processor_id_type | processor_id () const |
T & | getSampler (const std::string &name) |
Sampler & | getSampler (const std::string &name) |
T & | getSamplerByName (const SamplerName &name) |
Sampler & | getSamplerByName (const SamplerName &name) |
template<> | |
SurrogateModel & | getSurrogateModel (const std::string &name) const |
template<> | |
SurrogateTrainerBase & | getSurrogateTrainer (const std::string &name) const |
template<> | |
SurrogateModel & | getSurrogateModelByName (const UserObjectName &name) const |
template<> | |
SurrogateTrainerBase & | getSurrogateTrainerByName (const UserObjectName &name) const |
const std::string & | modelMetaDataName () const |
Accessor for the name of the model meta data. More... | |
const FileName & | getModelDataFileName () const |
Get the associated filename. More... | |
bool | hasModelData () const |
Check if we need to load model data (if the filename parameter is used) More... | |
virtual void | evaluate (const std::vector< Real > &x, std::vector< Real > &y) const |
Various evaluate methods that can be overriden. More... | |
virtual Real | evaluate (const std::vector< Real > &x, Real &std) const |
Evaluate methods that also return predicted standard deviation (see GaussianProcess.h) More... | |
virtual void | evaluate (const std::vector< Real > &x, std::vector< Real > &y, std::vector< Real > &) const |
template<typename T = SurrogateModel> | |
T & | getSurrogateModel (const std::string &name) const |
Get a SurrogateModel/Trainer with a given name. More... | |
template<typename T = SurrogateTrainerBase> | |
T & | getSurrogateTrainer (const std::string &name) const |
template<typename T = SurrogateModel> | |
T & | getSurrogateModelByName (const UserObjectName &name) const |
Get a sampler with a given name. More... | |
template<typename T = SurrogateTrainerBase> | |
T & | getSurrogateTrainerByName (const UserObjectName &name) const |
template<typename T , typename... Args> | |
T & | declareModelData (const std::string &data_name, Args &&... args) |
Declare model data for loading from file as well as restart. More... | |
template<typename T , typename... Args> | |
const T & | getModelData (const std::string &data_name, Args &&... args) const |
Retrieve model data from the interface. More... | |
Static Public Member Functions | |
static InputParameters | validParams () |
static MooseEnum | defaultPredictorTypes () |
static MooseEnum | defaultResponseTypes () |
static void | callMooseError (MooseApp *const app, const InputParameters ¶ms, std::string msg, const bool with_prefix, const hit::Node *node) |
Public Attributes | |
const ConsoleStream | _console |
Static Public Attributes | |
static const std::string | type_param |
static const std::string | name_param |
static const std::string | unique_name_param |
static const std::string | app_param |
static const std::string | moose_base_param |
Protected Attributes | |
const std::shared_ptr< Moose::LibtorchArtificialNeuralNet > & | _nn |
Pointer to the neural net object (initialized as null) More... | |
const StochasticTools::Standardizer & | _input_standardizer |
Standardizer for use with input (x) More... | |
const StochasticTools::Standardizer & | _output_standardizer |
Standardizer for use with output response (y) More... | |
const bool & | _enabled |
MooseApp & | _app |
Factory & | _factory |
ActionFactory & | _action_factory |
const std::string & | _type |
const std::string & | _name |
const InputParameters & | _pars |
const Parallel::Communicator & | _communicator |
Definition at line 19 of file LibtorchANNSurrogate.h.
LibtorchANNSurrogate::LibtorchANNSurrogate | ( | const InputParameters & | parameters | ) |
Definition at line 24 of file LibtorchANNSurrogate.C.
|
inherited |
Declare model data for loading from file as well as restart.
Definition at line 78 of file RestartableModelInterface.h.
|
inlinestaticinherited |
Definition at line 27 of file SurrogateModel.h.
|
inlinestaticinherited |
Definition at line 28 of file SurrogateModel.h.
Referenced by EvaluateSurrogate::validParams().
|
inline |
Various evaluate methods that can be overriden.
Definition at line 43 of file SurrogateModel.h.
|
inline |
Evaluate methods that also return predicted standard deviation (see GaussianProcess.h)
Definition at line 53 of file SurrogateModel.h.
|
inline |
Evaluate surrogate model given a row of parameters.
Definition at line 33 of file SurrogateModel.h.
|
inline |
Definition at line 59 of file SurrogateModel.h.
Evaluate surrogate model given a row of parameters.
Reimplemented from SurrogateModel.
Definition at line 35 of file LibtorchANNSurrogate.C.
|
inlinevirtualinherited |
Various evaluate methods that can be overriden.
Reimplemented in GaussianProcessSurrogate, PolynomialRegressionSurrogate, and NearestPointSurrogate.
Definition at line 43 of file SurrogateModel.h.
|
inlinevirtualinherited |
Evaluate methods that also return predicted standard deviation (see GaussianProcess.h)
Reimplemented in GaussianProcessSurrogate.
Definition at line 53 of file SurrogateModel.h.
|
inlinevirtualinherited |
Reimplemented in GaussianProcessSurrogate.
Definition at line 59 of file SurrogateModel.h.
|
inherited |
Retrieve model data from the interface.
Definition at line 85 of file RestartableModelInterface.h.
|
inherited |
Get the associated filename.
Definition at line 33 of file RestartableModelInterface.C.
|
inherited |
Definition at line 46 of file SurrogateModelInterface.C.
|
inherited |
Get a SurrogateModel/Trainer with a given name.
name | The name of the parameter key of the sampler to retrieve |
Definition at line 81 of file SurrogateModelInterface.h.
Referenced by SurrogateTrainer::initialize().
|
inherited |
Definition at line 31 of file SurrogateModelInterface.C.
|
inherited |
Get a sampler with a given name.
name | The name of the sampler to retrieve |
Definition at line 88 of file SurrogateModelInterface.h.
Referenced by CrossValidationScores::CrossValidationScores(), EvaluateSurrogate::EvaluateSurrogate(), and InverseMapping::initialSetup().
|
inherited |
Definition at line 104 of file SurrogateModelInterface.h.
|
inherited |
Definition at line 60 of file SurrogateModelInterface.C.
|
inherited |
Definition at line 53 of file SurrogateModelInterface.C.
|
inherited |
Definition at line 111 of file SurrogateModelInterface.h.
Referenced by SurrogateTrainerOutput::output().
|
inherited |
Check if we need to load model data (if the filename parameter is used)
Definition at line 39 of file RestartableModelInterface.C.
|
inlineinherited |
Accessor for the name of the model meta data.
Definition at line 47 of file RestartableModelInterface.h.
Referenced by SurrogateTrainerOutput::output(), and MappingOutput::output().
|
static |
Definition at line 17 of file LibtorchANNSurrogate.C.
|
protected |
Standardizer for use with input (x)
Definition at line 33 of file LibtorchANNSurrogate.h.
Referenced by evaluate().
|
protected |
Pointer to the neural net object (initialized as null)
Definition at line 30 of file LibtorchANNSurrogate.h.
Referenced by evaluate().
|
protected |
Standardizer for use with output response (y)
Definition at line 36 of file LibtorchANNSurrogate.h.
Referenced by evaluate().