https://mooseframework.inl.gov
Loading...
Searching...
No Matches
LibtorchArtificialNeuralNetParameters.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#ifdef MOOSE_LIBTORCH_ENABLED
11
12#pragma once
13
14#include <torch/torch.h>
16#include "GeneralReporter.h"
17#include "nlohmann/json.h"
18
24{
25public:
27
29
30 void initialize() override {};
31 void execute() override;
32 void finalize() override {};
33
34 void initialSetup() override;
35
36protected:
38 const std::string _control_name;
39
42
46};
47
48#endif
Reporter object that has a single execution of the "execute" method for each execute flag.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
A Reporter which can print the parameter values of a LibtorchArtificialNeuralNetwork from within a Co...
const Moose::LibtorchArtificialNeuralNet *& _network
Reference to a neural net pointer declared as a reporter.
void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
const std::string _control_name
The name of the control objects which hold the neural networks.
void initialize() override
Called before execute() is ever called so that data can be cleared.
const LibtorchNeuralNetControl * _controller
Pointer to the controller so that we can avoid warehouse lookups in the execute function.
A time-dependent, neural network-based control of multiple input parameters.