class TorchBernoulliDist
More...
#include <torch_bernoulli_dist.h>
◆ TorchBernoulliDist() [1/2]
| bitrl::maths::stats::TorchBernoulliDist::TorchBernoulliDist |
( |
| ) |
|
|
default |
◆ TorchBernoulliDist() [2/2]
| bitrl::maths::stats::TorchBernoulliDist::TorchBernoulliDist |
( |
torch_tensor_t | probs, |
|
|
bool | do_build_from_logits = false ) |
Build the categorical distribution from given torch_tensor_t of probabilities. if the flag build_from_logits, then the given tensor is assumed to represent logits.
◆ ~TorchBernoulliDist()
| virtual bitrl::maths::stats::TorchBernoulliDist::~TorchBernoulliDist |
( |
| ) |
|
|
virtualdefault |
~TorchCategorical. Destructor
◆ build_from_logits()
| void bitrl::maths::stats::TorchBernoulliDist::build_from_logits |
( |
torch_tensor_t | logits | ) |
|
build the distribution form logits
◆ build_from_probabilities()
| void bitrl::maths::stats::TorchBernoulliDist::build_from_probabilities |
( |
torch_tensor_t | probs | ) |
|
build the distribution from probabilities
◆ entropy()
| virtual torch_tensor_t bitrl::maths::stats::TorchBernoulliDist::entropy |
( |
| ) |
const |
|
overridevirtual |
◆ get_logits()
| torch_tensor_t bitrl::maths::stats::TorchBernoulliDist::get_logits |
( |
| ) |
const |
|
inline |
◆ get_probs()
| torch_tensor_t bitrl::maths::stats::TorchBernoulliDist::get_probs |
( |
| ) |
const |
|
inline |
◆ log_prob()
◆ sample()
| virtual torch_tensor_t bitrl::maths::stats::TorchBernoulliDist::sample |
( |
c10::ArrayRef< int64_t > | sample_shape = {} | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: