pub struct NeuralGraphOptimizer { /* private fields */ }Expand description
Neural Graph Optimizer combining policy and value networks
Implementations§
Source§impl NeuralGraphOptimizer
impl NeuralGraphOptimizer
Sourcepub fn new(graph: DynamicGraph, config: OptimizerConfig) -> Self
pub fn new(graph: DynamicGraph, config: OptimizerConfig) -> Self
Create a new neural graph optimizer
Sourcepub fn optimize_step(&mut self) -> OptimizationResult
pub fn optimize_step(&mut self) -> OptimizationResult
Run one optimization step
Sourcepub fn search_skip_regions(&self) -> Vec<usize>
pub fn search_skip_regions(&self) -> Vec<usize>
Get learned skip regions for subpolynomial search
Sourcepub fn graph(&self) -> &DynamicGraph
pub fn graph(&self) -> &DynamicGraph
Get underlying graph
Sourcepub fn graph_mut(&mut self) -> &mut DynamicGraph
pub fn graph_mut(&mut self) -> &mut DynamicGraph
Get mutable graph
Sourcepub fn optimize(&mut self, steps: usize) -> Vec<OptimizationResult>
pub fn optimize(&mut self, steps: usize) -> Vec<OptimizationResult>
Run multiple optimization steps
Auto Trait Implementations§
impl !Freeze for NeuralGraphOptimizer
impl !RefUnwindSafe for NeuralGraphOptimizer
impl Send for NeuralGraphOptimizer
impl Sync for NeuralGraphOptimizer
impl Unpin for NeuralGraphOptimizer
impl UnwindSafe for NeuralGraphOptimizer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more