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
paramscrate. - iter
- iterators for parameters within a neural network
Structs§
- Params
Base - The
ParamsBaseimplementation 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. - Params
Ref
Enums§
- Params
Error - the
ParamsErrorenumerates various errors that can occur within the parameters of a neural network.
Traits§
- Biased
- Exact
DimParams - GetBias
Dim - NdIter
- NdIter
Mut - RawParams
- The
RawParamstrait 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. - Scalar
Params - The
ScalarParamsis a marker trait automatically implemented for - Tensor
Params - 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
ParamsBasewith a borrowed internal layout - Params
- A type alias for a
ParamsBasewith an owned internal layout - Params
View - A type alias for an immutable view of the parameters
- Params
View Mut - A type alias for a mutable view of the parameters
- RawMut
Params - A type alias for the
ParamsBasewhose elements are of type*mut Ausing aRawViewReprlayout - RawView
Params - A type alias for the
ParamsBasewhose elements are of type*const Ausing aRawViewReprlayout - Result
- A type alias for a
Resultwhich uses theParamsErrortype