pub struct NetworkWeights<F: IntegrateFloat> {
pub layer1_weights: Array2<F>,
pub layer1_biases: Array1<F>,
pub layer2_weights: Array2<F>,
pub layer2_biases: Array1<F>,
pub advantage_weights: Array2<F>,
pub advantage_biases: Array1<F>,
pub value_weights: Array1<F>,
pub value_bias: F,
}Expand description
Network weights for the deep Q-network
Fields§
§layer1_weights: Array2<F>Layer 1 weights (64 -> 128)
layer1_biases: Array1<F>Layer 1 biases
layer2_weights: Array2<F>Layer 2 weights (128 -> 64)
layer2_biases: Array1<F>Layer 2 biases
advantage_weights: Array2<F>Advantage stream weights (64 -> 32)
advantage_biases: Array1<F>Advantage biases
value_weights: Array1<F>State value weights (64 -> 1)
value_bias: FState value bias
Implementations§
Source§impl<F: IntegrateFloat> NetworkWeights<F>
impl<F: IntegrateFloat> NetworkWeights<F>
pub fn new() -> IntegrateResult<Self>
pub fn initialize_xavier(&mut self) -> IntegrateResult<()>
Trait Implementations§
Source§impl<F: Clone + IntegrateFloat> Clone for NetworkWeights<F>
impl<F: Clone + IntegrateFloat> Clone for NetworkWeights<F>
Source§fn clone(&self) -> NetworkWeights<F>
fn clone(&self) -> NetworkWeights<F>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<F> Freeze for NetworkWeights<F>where
F: Freeze,
impl<F> RefUnwindSafe for NetworkWeights<F>where
F: RefUnwindSafe,
impl<F> Send for NetworkWeights<F>where
F: Send,
impl<F> Sync for NetworkWeights<F>where
F: Sync,
impl<F> Unpin for NetworkWeights<F>where
F: Unpin,
impl<F> UnwindSafe for NetworkWeights<F>where
F: UnwindSafe + RefUnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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