Trait relearn::torch::history::features::PackedHistoryFeaturesView [−][src]
pub trait PackedHistoryFeaturesView {
fn discount_factor(&self) -> f64;
fn episode_ranges(&self) -> &[Range<usize>];
fn batch_sizes(&self) -> &[i64];
fn batch_sizes_tensor(&self) -> &Tensor;
fn observation_features(&self) -> &Tensor;
fn actions(&self) -> &Tensor;
fn returns(&self) -> &Tensor;
fn rewards(&self) -> &Tensor;
fn device(&self) -> Device;
}
Expand description
View packed history features
Required methods
fn discount_factor(&self) -> f64
fn discount_factor(&self) -> f64
Discount factor for calculating returns.
Episode index ranges sorted in decreasing order of episode length.
fn batch_sizes(&self) -> &[i64]
fn batch_sizes(&self) -> &[i64]
Batch sizes in the packing.
Note: Batch sizes are always >= 0 but the tch API uses i64.
fn batch_sizes_tensor(&self) -> &Tensor
fn batch_sizes_tensor(&self) -> &Tensor
Batch sizes in the packing. A 1D i64 tensor.
fn observation_features(&self) -> &Tensor
fn observation_features(&self) -> &Tensor
Packed observation features. A 2D f64 tensor.
Packed action values.
A tensor of any type and shape, apart from the first dimension along which actions are
packed. Appropriate for passing to ParameterizedDistributionSpace
methods.