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

Discount factor for calculating returns.

Episode index ranges sorted in decreasing order of episode length.

Batch sizes in the packing.

Note: Batch sizes are always >= 0 but the tch API uses i64.

Batch sizes in the packing. A 1D i64 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.

Packed returns (discounted reward-to-go). A 1D f32 tensor.

Packed rewards. A 1D f32 tensor.

Device on which tensors will be placed.

Implementors