#include <torch_categorical.h>
◆ TorchCategorical() [1/2]
| bitrl::maths::stats::TorchCategorical::TorchCategorical |
( |
| ) |
|
|
default |
◆ TorchCategorical() [2/2]
| bitrl::maths::stats::TorchCategorical::TorchCategorical |
( |
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.
◆ ~TorchCategorical()
| bitrl::maths::stats::TorchCategorical::~TorchCategorical |
( |
| ) |
|
|
overridedefault |
~TorchCategorical. Destructor
◆ build_from_logits()
| void bitrl::maths::stats::TorchCategorical::build_from_logits |
( |
torch_tensor_t | logits | ) |
|
build the distribution form logits
◆ build_from_probabilities()
| void bitrl::maths::stats::TorchCategorical::build_from_probabilities |
( |
torch_tensor_t | probs | ) |
|
build the distribution from probabilities
◆ entropy()
| virtual torch_tensor_t bitrl::maths::stats::TorchCategorical::entropy |
( |
| ) |
const |
|
overridevirtual |
◆ get_logits()
| torch_tensor_t bitrl::maths::stats::TorchCategorical::get_logits |
( |
| ) |
const |
|
inline |
◆ get_probs()
| torch_tensor_t bitrl::maths::stats::TorchCategorical::get_probs |
( |
| ) |
const |
|
inline |
◆ log_prob()
◆ sample()
| virtual torch_tensor_t bitrl::maths::stats::TorchCategorical::sample |
( |
c10::ArrayRef< int64_t > | sample_shape = {} | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: