pulsatrix
Loading...
Searching...
No Matches
pulsatrix::TanhGaussianSample Struct Reference

The (action, log_prob) pair TanhGaussianPolicy::forward() produces. More...

#include <tanh_gaussian_policy.hpp>

Collaboration diagram for pulsatrix::TanhGaussianSample:

Public Attributes

Tensor action
 
Tensor log_prob
 

Detailed Description

The (action, log_prob) pair TanhGaussianPolicy::forward() produces.

Note
A return-pair struct rather than two out-parameters, mirroring ReparamGrad's precedent: the two outputs are produced by one indivisible computation (log_prob's squash-correction term is a function of the very action being returned), so splitting them across two calls would either duplicate the forward or need a cache-then-fetch protocol no other class in this codebase uses.
action is (N, action_dim) – the bounded action handed to the environment. log_prob is (N, 1): the per-sample log-density of the joint action, i.e. already summed over action_dim (a diagonal Gaussian's dimensions are independent, so the joint log-density is the sum of the per-dimension ones). For action_dim == 1 the sum is a one-term sum, not a special case.

Member Data Documentation

◆ action

Tensor pulsatrix::TanhGaussianSample::action

◆ log_prob

Tensor pulsatrix::TanhGaussianSample::log_prob

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