#include <stdio.h>
Go to the source code of this file.
Data Structures | |
| struct | _nnLayer |
| A layer of nodes. More... | |
| struct | _nnLink |
| A link between nodes. More... | |
| struct | _nnNet |
| A neural network. More... | |
| struct | _nnNode |
| A node. More... | |
Typedefs | |
| typedef _nnLink | nnLink |
| A link between nodes. | |
| typedef _nnNode | nnNode |
| A node. | |
| typedef _nnLayer | nnLayer |
| A layer of nodes. | |
| typedef _nnNet | nnNet |
| A neural network. | |
| typedef enum _nnFileType | nnFileType |
| Return value for nnGuessFileType(). | |
Enumerations | |
| enum | _nnFileType { nnFileTypeUnknown, nnFileTypeBinary, nnFileTypeXML } |
| Return value for nnGuessFileType(). More... | |
Functions | |
| nnLayer * | nnGetNetworkOutputLayer (nnNet *net) |
| Returns the output layer of a network. | |
| nnLayer * | nnGetNetworkInputLayer (nnNet *net) |
| Returns the input layer of a network. | |
| double | nnSigmoid (nnNode *node) |
| Sigmoid function. | |
| double | nnDSigmoid (nnNode *node) |
| Derivative of the sigmoid function. | |
| void | nnRunNetwork (nnNet *net) |
| Evaluate each successive layer of a network, from input to output. | |
| void | nnSetNetworkInputs (nnNet *net, const double inputs[]) |
| Set the input nodes of a network from an array. | |
| void | nnGetNetworkOutputs (nnNet *net, double outputs[]) |
| Stores the states of all output nodes in a network into an array. | |
| void | nnCalculateOutputLayerError (nnLayer *layer, const double targets[]) |
| Calculate error of the output layer. | |
| void | nnCalculateHiddenLayerError (nnLayer *layer, nnLayer *nextLayer) |
| Calculate error of a hidden layer. | |
| void | nnUpdateLayer (nnLayer *layer, nnNet *net) |
| Update weights of a layer. | |
| void | nnUpdateNetwork (nnNet *net, const double targets[]) |
| Update weights of a network. | |
| void | nnUpdateLayerBatch (nnLayer *layer, nnNet *net) |
| Update weight deltas of a layer. | |
| void | nnUpdateNetworkBatch (nnNet *net, double const targets[]) |
| Update weight deltas of a network. | |
| void | nnClearNetworkWeightDeltas (nnNet *net) |
| Clear weight deltas of a network. | |
| void | nnUpdateNetworkWeights (nnNet *net) |
| Update weights of a network using weight deltas. | |
| int | nnSaveNetwork (nnNet *net, void *handle, int(*nnWrite)(void *handle, void *data, size_t len)) |
| Save a network's topology and weights. | |
| int | nnSaveNetworkFile (nnNet *net, FILE *f) |
| Save a network's topology and weights to a file. | |
| int | nnSaveNetworkMem (nnNet *net, void *data, size_t len) |
| Save a network's topology and weights to memory. | |
| int | nnSaveNetworkDynMem (nnNet *net, void **ptr, size_t *len) |
| Save a network's topology and weights to dynamically-allocated memory. | |
| nnNet * | nnLoadNetwork (void *handle, int(*nnRead)(void *handle, void *data, size_t len)) |
| Load a network. | |
| nnNet * | nnLoadNetworkFile (FILE *f) |
| Load a network from a file. | |
| nnNet * | nnLoadNetworkMem (void *data, size_t len) |
| Load a network from memory. | |
| nnFileType | nnGuessFileType (FILE *f) |
| Determines the type of a file. | |
| int | nnSaveNetworkXML (nnNet *net, FILE *f) |
| Save a network's topology and weights to an XML-format file. | |
| nnNet * | nnLoadNetworkXML (FILE *f) |
| Load a network's topology and weights from an XML-format file. | |
| double | nnGetLayerError (nnLayer *layer) |
| Calculate error of nodes in a layer. | |
| double | nnGetLayerRMSError (nnLayer *layer) |
| Calculate RMS error of nodes in a layer. | |
| void | nnIterateNetworkNodes (nnNet *net, void(*f)(nnLayer *layer, nnNode *node, void *data), void *data) |
| Call a function for each node in a network. | |
| void | nnIterateNetworkLinks (nnNet *net, void(*f)(nnNode *dest, nnLink *link, void *data), void *data) |
| Call a function for each link in a network. | |
| void | nnDestroyNetwork (nnNet *net) |
| free() a network and all associated structures. | |
| nnNet * | nnCreateFullyConnectedNetwork (int nlayers, const int nnodes[]) |
| Create a fully-connected network. | |
| nnNet * | nnCopyNetwork (nnNet *net) |
| Make a deep-copy of a network. | |
|
|
Return value for nnGuessFileType().
|
|
||||||||||||
|
Calculate error of a hidden layer.
|
|
||||||||||||
|
Calculate error of the output layer.
|
|
|
Make a deep-copy of a network. Performs a deep-copy of a network. The new network will be an exact copy of source, having the same topology, weights, etc.
|
|
||||||||||||
|
Create a fully-connected network. Creates a fully-connected neural network with nlayers layers. The first layer will have nnodes[0] nodes in it, the second layer will have nnodes[1] nodes in it, etc. The network will have a bias node.
|
|
|
free() a network and all associated structures. Frees a network and all associated structures (layers, nodes, links). Any non-NULL structure pointers are recursively freed.
|
|
|
Derivative of the sigmoid function.
|
|
|
Calculate error of nodes in a layer.
|
|
|
Calculate RMS error of nodes in a layer.
|
|
||||||||||||
|
Stores the states of all output nodes in a network into an array.
|
|
|
Determines the type of a file.
|
|
||||||||||||||||
|
Call a function for each link in a network.
|
|
||||||||||||||||
|
Call a function for each node in a network. Calls func for each node in a network, including the bias node, if any. args is passed to func as the argument data. func's layer argument will be NULL for the bias node.
|
|
||||||||||||
|
Load a network.
|
|
|
Load a network from a file.
|
|
||||||||||||
|
Load a network from memory.
|
|
|
Load a network's topology and weights from an XML-format file.
|
|
|
Evaluate each successive layer of a network, from input to output.
|
|
||||||||||||||||
|
Save a network's topology and weights.
|
|
||||||||||||||||
|
Save a network's topology and weights to dynamically-allocated memory.
|
|
||||||||||||
|
Save a network's topology and weights to a file.
|
|
||||||||||||||||
|
Save a network's topology and weights to memory.
|
|
||||||||||||
|
Save a network's topology and weights to an XML-format file.
|
|
||||||||||||
|
Set the input nodes of a network from an array.
|
|
|
Sigmoid function.
|
|
||||||||||||
|
Update weights of a layer.
|
|
||||||||||||
|
Update weights of a network.
|
1.2.18