|
bitsim
Model, simulate, estimate and control robots in C++
|
The TorchDistribution class. Base class to derive distributions for PyTorch. More...
#include <torch_distribution.h>

Public Member Functions | |
| virtual | ~TorchDistributionBase ()=default |
| Destructor. | |
| virtual torch_tensor_t | entropy () const =0 |
| entropy | |
| virtual torch_tensor_t | log_prob (torch_tensor_t value)=0 |
| log_prob | |
| virtual torch_tensor_t | sample (c10::ArrayRef< int64_t > sample_shape)=0 |
| Ssample. Sample from the distribution. | |
Protected Member Functions | |
| TorchDistributionBase ()=default | |
| Constructor. | |
| std::vector< int64_t > | extended_shape (c10::ArrayRef< int64_t > sample_shape) |
| extended_shape | |
Protected Attributes | |
| std::vector< int64_t > | batch_shape_ |
| batch_shape_ | |
| std::vector< int64_t > | event_shape_ |
| event_shape_ | |
The TorchDistribution class. Base class to derive distributions for PyTorch.
|
virtualdefault |
Destructor.
|
protecteddefault |
Constructor.
|
pure virtual |
entropy
Implemented in bitrl::maths::stats::TorchBernoulliDist, bitrl::maths::stats::TorchCategorical, bitrl::maths::stats::TorchNormalDist, ppo_cartpole::TorchCategorical, ppo_distributed::TorchCategorical, ppo_parallel_rollouts::TorchCategorical, pytorch_policy_network::TorchCategorical, rl_example_11::TorchCategorical, rl_example_11::TorchNormalDist, rl_example_13::TorchCategorical, and rl_example_21::TorchCategorical.
|
protected |
extended_shape
| sample_shape |
|
pure virtual |
log_prob
| value |
Implemented in bitrl::maths::stats::TorchBernoulliDist, bitrl::maths::stats::TorchCategorical, bitrl::maths::stats::TorchNormalDist, ppo_cartpole::TorchCategorical, ppo_distributed::TorchCategorical, ppo_parallel_rollouts::TorchCategorical, pytorch_policy_network::TorchCategorical, rl_example_11::TorchCategorical, rl_example_11::TorchNormalDist, and rl_example_13::TorchCategorical.
|
pure virtual |
Ssample. Sample from the distribution.
Implemented in bitrl::maths::stats::TorchBernoulliDist, bitrl::maths::stats::TorchCategorical, ppo_cartpole::TorchCategorical, ppo_distributed::TorchCategorical, ppo_parallel_rollouts::TorchCategorical, pytorch_policy_network::TorchCategorical, rl_example_11::TorchCategorical, rl_example_13::TorchCategorical, and rl_example_21::TorchCategorical.
|
protected |
batch_shape_
|
protected |
event_shape_