pub struct GpuNeuralNet {
pub layers: Vec<NeuralLayer>,
}Expand description
A sequential neural network backed by a CPU mock GPU context.
Fields§
§layers: Vec<NeuralLayer>Ordered list of layers in the network.
Implementations§
Source§impl GpuNeuralNet
impl GpuNeuralNet
Sourcepub fn add_layer(&mut self, layer: NeuralLayer)
pub fn add_layer(&mut self, layer: NeuralLayer)
Append a layer to the network.
Sourcepub fn forward_pass(&self, input: &[f64]) -> Vec<f64>
pub fn forward_pass(&self, input: &[f64]) -> Vec<f64>
Run a single forward pass through all layers.
Trait Implementations§
Source§impl Clone for GpuNeuralNet
impl Clone for GpuNeuralNet
Source§fn clone(&self) -> GpuNeuralNet
fn clone(&self) -> GpuNeuralNet
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GpuNeuralNet
impl Debug for GpuNeuralNet
Auto Trait Implementations§
impl Freeze for GpuNeuralNet
impl RefUnwindSafe for GpuNeuralNet
impl Send for GpuNeuralNet
impl Sync for GpuNeuralNet
impl Unpin for GpuNeuralNet
impl UnsafeUnpin for GpuNeuralNet
impl UnwindSafe for GpuNeuralNet
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