Crate params

Crate params 

Source
Expand description

In machine learning, each layer is composed of some set of neurons that process input data to produce some meaningful output. Each neuron typically has associated parameters, namely weights and biases, which are adjusted during training to optimize the model’s performance.

§Overview

The params crate provides a generic and flexible structure for handling these values. At its core, the ParamsBase object is defined as an object composed of two independent tensors:

  • An $n$ dimensional weight tensor
  • An $n-1$ dimensional bias tensor

These tensors can be of any shape or size, allowing for a wide range of neural network architectures to be represented. The crate also provides various utilities and traits for manipulating and interacting with these parameters, making it easier to build and train neural networks.

Modules§

error
This module defines error types and handling mechanisms for the params crate.
iter
iterators for parameters within a neural network

Structs§

ParamsBase
The ParamsBase implementation aims to provide a generic, n-dimensional weight and bias pair for a model (or layer). The object requires the bias tensor to be a single dimension smaller than the weights tensor.
ParamsRef

Enums§

ParamsError
the ParamsError enumerates various errors that can occur within the parameters of a neural network.

Traits§

Biased
ExactDimParams
GetBiasDim
NdIter
NdIterMut
RawParams
The RawParams trait is used to denote objects capable of being used as a paramater within a neural network or machine learning context. More over, it provides us with an ability to associate some generic element type with the parameter and thus allows us to consider so-called parameter spaces. If we allow a parameter space to simply be a collection of points then we can refine the definition downstream to consider specific interpolations, distributions, or manifolds. In other words, we are trying to construct a tangible configuration space for our models so that we can reason about optimization and training in a more formal manner.
ScalarParams
The ScalarParams is a marker trait automatically implemented for
TensorParams
Weighted
A trait denoting an implementor with weights and associated methods

Functions§

extract_bias_dim
Extract a suitable dimension for a bias tensor from the given reference to the layout of the weight tensor.

Type Aliases§

ArcParams
A type alias for shared parameters
CowParams
A type alias for a ParamsBase with a borrowed internal layout
Params
A type alias for a ParamsBase with an owned internal layout
ParamsView
A type alias for an immutable view of the parameters
ParamsViewMut
A type alias for a mutable view of the parameters
RawMutParams
A type alias for the ParamsBase whose elements are of type *mut A using a RawViewRepr layout
RawViewParams
A type alias for the ParamsBase whose elements are of type *const A using a RawViewRepr layout
Result
A type alias for a Result which uses the ParamsError type