pub trait NetworkConfig<K, V> {
type Store: RawStore<K, V>;
// Required methods
fn store(&self) -> &Self::Store;
fn store_mut(&mut self) -> &mut Self::Store;
// Provided methods
fn get<'a>(&'a self, key: &K) -> Option<&'a V>
where Self::Store: 'a { ... }
fn get_mut<'a>(&'a mut self, key: &K) -> Option<&'a mut V>
where Self::Store: 'a + RawStoreMut<K, V> { ... }
fn hyperparam<'a>(
&'a mut self,
key: K,
) -> <Self::Store as Store<K, V>>::Entry<'a>
where Self::Store: 'a + Store<K, V> { ... }
}Expand description
The NetworkConfig trait defines an interface for compatible configurations within the
framework, providing a layout and a key-value store to manage hyperparameters.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn get<'a>(&'a self, key: &K) -> Option<&'a V>where
Self::Store: 'a,
fn get<'a>(&'a self, key: &K) -> Option<&'a V>where
Self::Store: 'a,
get a reference to a value in the store by key