Module dfdx::nn

source · []
Expand description

High level neural network building blocks such as Linear, activations, and tuples as feedforward networks.

Saving and loading model parameters is done using SaveToNpz and LoadFromNpz. All modules provided here implement it, including tuples. So you can call SaveToNpz::save() to save the module to a .npz zip file format, and then LoadFromNpz::load() to load the weights.

Structs

Unit struct that impls Module as calling abs() on input.

Unit struct that impls Module as calling cos() on input.

A Module that calls dropout() in Module::forward() with probability self.p.

Unit struct that impls Module as calling exp() on input.

A linear transformation of the form xW + b, where W is a matrix, x is a vector or matrix, and b is a vector. If x is a matrix this does matrix multiplication.

Unit struct that impls Module as calling ln() on input.

Unit struct that impls Module as calling relu() on input.

Unit struct that impls Module as calling sigmoid() on input.

Unit struct that impls Module as calling sin() on input.

Unit struct that impls Module as calling sqrt() on input.

Unit struct that impls Module as calling square() on input.

Unit struct that impls Module as calling tanh() on input.

Enums

Error that can happen while loading data from a .npz zip archive.

Traits

Something that can be loaded from a .npz file (which is a zip file).

A unit of a neural network. Acts on the generic Input and produces Module::Output.

Something that can be saved to a .npz (which is a .zip).