bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
rl_example_11::TorchNormalDist Class Referencefinal

Normal distribution to be used with torchlib. More...

#include <torch_normal.h>

Inheritance diagram for rl_example_11::TorchNormalDist:
Collaboration diagram for rl_example_11::TorchNormalDist:

Public Member Functions

 TorchNormalDist (torch_tensor_t mu, torch_tensor_t sigma)
 Default constructor.
torch_tensor_t sample () const
 get a sample from the distribution
 ~TorchNormalDist () override=default
 ~TorchCategorical. Destructor
torch_tensor_t log_prob (torch_tensor_t value) override
 log_prob
torch_tensor_t entropy () const override
 Compute the entropy.
torch_tensor_t mean () const
 Returns the mean.
torch_tensor_t std () const
 Returns the standard deviation.
Public Member Functions inherited from bitrl::maths::stats::TorchDistributionBase
virtual ~TorchDistributionBase ()=default
 Destructor.

Additional Inherited Members

Protected Member Functions inherited from bitrl::maths::stats::TorchDistributionBase
 TorchDistributionBase ()=default
 Constructor.
std::vector< int64_t > extended_shape (c10::ArrayRef< int64_t > sample_shape)
 extended_shape
Protected Attributes inherited from bitrl::maths::stats::TorchDistributionBase
std::vector< int64_t > batch_shape_
 batch_shape_
std::vector< int64_t > event_shape_
 event_shape_

Detailed Description

Normal distribution to be used with torchlib.

Constructor & Destructor Documentation

◆ TorchNormalDist()

◆ ~TorchNormalDist()

~TorchCategorical. Destructor

Member Function Documentation

◆ entropy()

Compute the entropy.

Returns

Implements bitrl::maths::stats::TorchDistributionBase.

◆ log_prob()

◆ mean()

Returns the mean.

◆ sample()

get a sample from the distribution

◆ std()

Returns the standard deviation.


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