https://mooseframework.inl.gov
LibtorchDRLLogProbabilityPostprocessor.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 LIBTORCH_ENABLED
11 
12 #pragma once
13 
14 #include "LibtorchDRLControl.h"
15 #include "GeneralPostprocessor.h"
17 
23 {
24 public:
26 
32 
34 
37  void initialize() override {}
38  void execute() override {}
40 
45  void initialSetup() override;
46 
51  virtual Real getValue() const override;
52 
53 private:
54  const unsigned int _signal_index;
55 
56  // This can't be const beause PPs are constructed before Controls
58 };
59 
60 #endif
void initialSetup() override
We override this to setup the linking with the control object.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
LibtorchDRLLogProbabilityPostprocessor(const InputParameters &parameters)
Class constructor.
const InputParameters & parameters() const
A time-dependent, neural-network-based controller which is associated with a Proximal Policy Optimiza...
virtual Real getValue() const override
Returns the value of the latest response of a neural-network-based controller.
A class for querying output signals from LibtorchNeuralNetControl and derived objects.