Skip to main content

ValueFunction

Trait ValueFunction 

Source
pub trait ValueFunction {
    type Tensor: Clone;

    // Required method
    fn values(&self, observations: &[Self::Tensor]) -> Result<Self::Tensor>;
}
Expand description

Batched value-function interface.

Required Associated Types§

Source

type Tensor: Clone

Tensor type used for observations and returned values.

Required Methods§

Source

fn values(&self, observations: &[Self::Tensor]) -> Result<Self::Tensor>

Estimates values for a batch of observations.

§Errors

Returns an error if value inference fails.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§