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

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

#include <torch_normal.h>

Inheritance diagram for bitrl::maths::stats::TorchNormalDist:
Collaboration diagram for bitrl::maths::stats::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()

bitrl::maths::stats::TorchNormalDist::TorchNormalDist ( torch_tensor_t mu,
torch_tensor_t sigma )
explicit

Default constructor.

◆ ~TorchNormalDist()

bitrl::maths::stats::TorchNormalDist::~TorchNormalDist ( )
overridedefault

~TorchCategorical. Destructor

Member Function Documentation

◆ entropy()

torch_tensor_t bitrl::maths::stats::TorchNormalDist::entropy ( ) const
overridevirtual

Compute the entropy.

Returns

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

◆ log_prob()

torch_tensor_t bitrl::maths::stats::TorchNormalDist::log_prob ( torch_tensor_t value)
overridevirtual

log_prob

Parameters
value
Returns

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

◆ mean()

torch_tensor_t bitrl::maths::stats::TorchNormalDist::mean ( ) const
inline

Returns the mean.

◆ sample()

torch_tensor_t bitrl::maths::stats::TorchNormalDist::sample ( ) const

get a sample from the distribution

◆ std()

torch_tensor_t bitrl::maths::stats::TorchNormalDist::std ( ) const
inline

Returns the standard deviation.


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