https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
LibtorchRLMiniBatch Struct Reference

Tensor data for one PPO mini-batch. More...

#include <LibtorchRLMiniBatchSampler.h>

Public Member Functions

std::int64_t size () const
 Return the number of rows stored in the mini-batch.
 

Public Attributes

torch::Tensor observations
 Flattened observation rows for the mini-batch.
 
torch::Tensor actions
 Action rows that match the sampled observations.
 
torch::Tensor old_log_probabilities
 Behavior-policy log probabilities for the sampled actions.
 
torch::Tensor value_targets
 Critic targets aligned with the sampled observations.
 
torch::Tensor advantages
 Advantage estimates aligned with the sampled observations.
 

Detailed Description

Tensor data for one PPO mini-batch.

Definition at line 24 of file LibtorchRLMiniBatchSampler.h.

Member Function Documentation

◆ size()

std::int64_t LibtorchRLMiniBatch::size ( ) const
inline

Return the number of rows stored in the mini-batch.

Definition at line 40 of file LibtorchRLMiniBatchSampler.h.

40{ return observations.defined() ? observations.size(0) : 0; }
torch::Tensor observations
Flattened observation rows for the mini-batch.

Member Data Documentation

◆ actions

torch::Tensor LibtorchRLMiniBatch::actions

Action rows that match the sampled observations.

Definition at line 29 of file LibtorchRLMiniBatchSampler.h.

Referenced by LibtorchRLPPOLoss::compute(), and LibtorchRLMiniBatchSampler::makeMiniBatch().

◆ advantages

torch::Tensor LibtorchRLMiniBatch::advantages

Advantage estimates aligned with the sampled observations.

Definition at line 35 of file LibtorchRLMiniBatchSampler.h.

Referenced by LibtorchRLPPOLoss::compute(), and LibtorchRLMiniBatchSampler::makeMiniBatch().

◆ observations

torch::Tensor LibtorchRLMiniBatch::observations

Flattened observation rows for the mini-batch.

Definition at line 27 of file LibtorchRLMiniBatchSampler.h.

Referenced by LibtorchRLPPOLoss::compute(), LibtorchRLMiniBatchSampler::makeMiniBatch(), and size().

◆ old_log_probabilities

torch::Tensor LibtorchRLMiniBatch::old_log_probabilities

Behavior-policy log probabilities for the sampled actions.

Definition at line 31 of file LibtorchRLMiniBatchSampler.h.

Referenced by LibtorchRLPPOLoss::compute(), and LibtorchRLMiniBatchSampler::makeMiniBatch().

◆ value_targets

torch::Tensor LibtorchRLMiniBatch::value_targets

Critic targets aligned with the sampled observations.

Definition at line 33 of file LibtorchRLMiniBatchSampler.h.

Referenced by LibtorchRLPPOLoss::compute(), and LibtorchRLMiniBatchSampler::makeMiniBatch().


The documentation for this struct was generated from the following file: