[][src]Struct radiate::models::neat::tracer::Tracer

pub struct Tracer {
    pub neuron_activation: HashMap<Uuid, Vec<f32>>,
    pub neuron_derivative: HashMap<Uuid, Vec<f32>>,
    pub max_neuron_index: usize,
    pub index: usize,
}

Tracer keeps track of historical metadata for neurons to keep track of their activated values and derivatives so backpropagation (through time) is available for batch processing and weight updates

Fields

neuron_activation: HashMap<Uuid, Vec<f32>>neuron_derivative: HashMap<Uuid, Vec<f32>>max_neuron_index: usizeindex: usize

Methods

impl Tracer[src]

pub fn new() -> Self[src]

pub fn reset(&mut self)[src]

reset the tracer. The backprop works off of indexed values so when the layer is reset, the tracer must be reset as well

pub fn update_neuron_activation(&mut self, neuron_id: &Uuid, neuron_value: f32)[src]

update a neuron and add it's activated value 𝜎(Σ(w * i) + b)

pub fn update_neuron_derivative(&mut self, neuron_id: &Uuid, neuron_d: f32)[src]

update a neruon and add it's derivative of it's activated value to the tracer

pub fn neuron_activation(&self, neuron_id: Uuid) -> f32[src]

return the activated value of a neuron at the current index

pub fn neuron_derivative(&self, neuron_id: Uuid) -> f32[src]

return the derivative of a neuron at the current index

Trait Implementations

impl Clone for Tracer[src]

impl Debug for Tracer[src]

impl<'de> Deserialize<'de> for Tracer[src]

impl Serialize for Tracer[src]

Auto Trait Implementations

impl RefUnwindSafe for Tracer

impl Send for Tracer

impl Sync for Tracer

impl Unpin for Tracer

impl UnwindSafe for Tracer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any + Serialize + Deserialize
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Debug for T where
    T: Debug + Serialize + Deserialize + ?Sized
[src]

impl<T> Deserialize for T where
    T: DeserializeOwned
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Type for T[src]

type Meta = Concrete

Type of metadata for type.

impl<T> Type for T where
    T: ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,