pub trait MetaObjective<T: Float + Debug + Send + Sync + 'static> {
// Required methods
fn dimension(&self) -> usize;
fn initial_parameters(&self) -> Array1<T>;
fn loss_and_gradient(&self, params: &Array1<T>) -> Result<(T, Array1<T>)>;
// Provided method
fn name(&self) -> &str { ... }
}Expand description
A differentiable task a learned optimizer can be meta-trained on.
Implementors must be cheap to evaluate: a meta-training run calls
Self::loss_and_gradient on the order of
population × iterations × tasks × horizon times.
Required Methods§
Sourcefn initial_parameters(&self) -> Array1<T>
fn initial_parameters(&self) -> Array1<T>
The point a rollout starts from. Must have length Self::dimension.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".