10#ifdef MOOSE_LIBTORCH_ENABLED
PPO clipped surrogate loss on top of the reusable RL buffer/value-estimation core.
static torch::Tensor reduceActionDimension(const torch::Tensor &tensor)
Collapse multi-action log-probabilities or entropies into one column tensor.
const Real _entropy_coeff
Weight applied to the entropy bonus inside the actor loss.
const Real _clip_parameter
PPO clipping width used in the actor surrogate objective.
LibtorchRLPPOLossOutput compute(Moose::LibtorchActorNeuralNet &policy_network, Moose::LibtorchArtificialNeuralNet &value_network, const LibtorchRLMiniBatch &batch) const
Compute actor, critic, and entropy terms for one mini-batch.
Feed-forward actor network coupled to a Gaussian or Beta action distribution.
Tensor data for one PPO mini-batch.
Actor, critic, and entropy terms produced by one PPO loss evaluation.
torch::Tensor actor_loss
Clipped actor loss for the current mini-batch.
torch::Tensor critic_loss
Critic regression loss for the current mini-batch.
torch::Tensor entropy
Mean action-distribution entropy for the current mini-batch.