[−][src]Struct tsuga::fc_network::FullyConnectedNetwork
A fully-connected neural network
Fields
w: Vec<Array2<f32>>
Implementations
impl FullyConnectedNetwork
[src]
pub fn print_shape(&self)
[src]
Prints the primary shape parameters of the fully-connected network. This is useful for debugging
pub fn learnrate(self, learnrate: f32) -> Self
[src]
A hyperparameter of defining the learning rate of the network
pub fn iterations(self, iterations: usize) -> Self
[src]
A hyperparameter number of training iterations for the network (this combined with the batch_size
parameter can be used to set a particular number of epochs, in which every training record is seen a certain number of times)
pub fn min_iterations(self, min_iterations: usize) -> Self
[src]
A hyperparameter setting the minimum number of iterations the network must train for before returning (can be used to override the error threshold)
pub fn error_threshold(self, error_threshold: f32) -> Self
[src]
A hyperparameter that will exit the
pub fn batch_size(self, batch_size: usize) -> Self
[src]
A hyperparameter defining the size of the training batches (can be used with iterations
to define the number of epochs)
pub fn validation_pct(self, validation_pct: f32) -> Self
[src]
A hyperparameter defining the percentage of the training data to hold back as a validation set
pub fn build(self) -> FullyConnectedNetwork
[src]
Returns a struct with the completed network architecture
pub fn default(input: Array2<f32>, output: Array2<f32>) -> Self
[src]
Builds a basic two-layer network, with the default values for all hyperparameters
pub fn add_layers(self, layers_cfg: Vec<FCLayer>) -> Self
[src]
Takes a Vec
pub fn train(&mut self) -> Result<(), Box<dyn Error>>
[src]
Begins the training process of the network, using the hyperparameters defined during the network's construction and supplied layer configuration data. A progress-bar and error data is printed to the command-line during this process, and can be exited at any time by pressing q
or Esc
.
pub fn evaluate(self, input: Array2<f32>) -> Array2<f32>
[src]
Evaluates the network by running a forward pass on a supplied input using the (trained) network weights
Trait Implementations
impl Clone for FullyConnectedNetwork
[src]
fn clone(&self) -> FullyConnectedNetwork
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for FullyConnectedNetwork
[src]
Auto Trait Implementations
impl RefUnwindSafe for FullyConnectedNetwork
impl Send for FullyConnectedNetwork
impl Sync for FullyConnectedNetwork
impl Unpin for FullyConnectedNetwork
impl UnwindSafe for FullyConnectedNetwork
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme,
Scheme: ApproxScheme,
type Err = NoError
The error type produced by a failed conversion.
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, Dst> ConvAsUtil<Dst> for T
fn approx(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
Self: ApproxInto<Dst, DefaultApprox>,
fn approx_by<Scheme>(self) -> Result<Dst, Self::Err> where
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
impl<T> ConvUtil for T
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
Self: ApproxInto<Dst, DefaultApprox>,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
fn into_as<Dst>(self) -> Dst where
Self: Into<Dst>,
Self: Into<Dst>,
fn try_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: TryInto<Dst>,
Self: TryInto<Dst>,
fn value_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ValueInto<Dst>,
Self: ValueInto<Dst>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<Src> TryFrom<Src> for Src
type Err = NoError
The error type produced by a failed conversion.
fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<Src, Dst> TryInto<Dst> for Src where
Dst: TryFrom<Src>,
Dst: TryFrom<Src>,
type Err = <Dst as TryFrom<Src>>::Err
The error type produced by a failed conversion.
fn try_into(self) -> Result<Dst, <Src as TryInto<Dst>>::Err>
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<Src> ValueFrom<Src> for Src
type Err = NoError
The error type produced by a failed conversion.
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>,
Dst: ValueFrom<Src>,
type Err = <Dst as ValueFrom<Src>>::Err
The error type produced by a failed conversion.