pub struct QNetworkBurnConfig {
pub hidden_dim: usize,
pub use_orthogonal_init: bool,
pub seed: Option<u64>,
}Expand description
Configuration for QNetworkBurn architecture.
Held as a separate type from
crate::policy::mlp::MlpBurnConfig so that callers can
independently tune the Q-network (e.g. wider hidden_dim for richer
observation spaces) without dragging the policy module along.
Fields§
Width of every hidden layer.
use_orthogonal_init: boolIf true, initialize hidden-layer weights with orthogonal
(gain sqrt(2)) and the Q-head with gain = 0.01. Set
false for Burn’s stock Kaiming-uniform default.
seed: Option<u64>Optional construction seed. When Some, every layer is built from a
deterministically-derived host-side RNG stream (see
crate::policy::seeded_init) so two constructions with the same seed
produce bit-identical networks. When None (the default) Burn’s
unseedable Initializer path is used verbatim. This mirrors
crate::policy::continuous_q::ContinuousQNetworkConfig::seed so the
discrete and continuous Q-networks share the same reproducibility hook.
Implementations§
Source§impl QNetworkBurnConfig
impl QNetworkBurnConfig
Sourcepub fn with_seed(self, seed: u64) -> Self
pub fn with_seed(self, seed: u64) -> Self
Set the construction seed, enabling the deterministic host-side init
path in QNetworkBurn::with_config.
let cfg = QNetworkBurnConfig::default().with_seed(42);
assert_eq!(cfg.seed, Some(42));Trait Implementations§
Source§impl Clone for QNetworkBurnConfig
impl Clone for QNetworkBurnConfig
Source§fn clone(&self) -> QNetworkBurnConfig
fn clone(&self) -> QNetworkBurnConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for QNetworkBurnConfig
Source§impl Debug for QNetworkBurnConfig
impl Debug for QNetworkBurnConfig
Auto Trait Implementations§
impl Freeze for QNetworkBurnConfig
impl RefUnwindSafe for QNetworkBurnConfig
impl Send for QNetworkBurnConfig
impl Sync for QNetworkBurnConfig
impl Unpin for QNetworkBurnConfig
impl UnsafeUnpin for QNetworkBurnConfig
impl UnwindSafe for QNetworkBurnConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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