|
NeuroTIC 0.0
|
Implementation of network construction functions. More...
#include "ntbuilder.h"#include "ntmemory.h"#include <stdlib.h>#include <string.h>#include <stdio.h>
Go to the source code of this file.
Functions | |
| struct net_s * | newnet (net_s *net, uint16_t *neurons_per_layer, layer_t layers_size) |
| Initializes a new neural network structure. | |
| struct net_s * | buildnet (net_s *net) |
| Builds the internal buffers and connections of a neural network. | |
Implementation of network construction functions.
Provides memory allocation and pointer setup for neurons, input/output references, and inter-layer buffers.
Uses memtrack() to manage memory safely.
Definition in file ntbuilder.c.
Builds the internal buffers and connections of a neural network.
Allocates memory for inputs, outputs, and inter-layer buffers according to the bff_wiring configuration.
Sets neuron input pointers and weight arrays.
Buffer type explanations:
src_type.Validates wiring configurations and ensures all pointers are correctly set up for feedforward computation. Uses memtrack for all allocations.
References wiring_s::array_type, wiring_s::arrays, net_s::bff, neuron_s::bff_idx, neuron_s::in, net_s::in, neuron_s::inputs, net_s::inputs, net_s::layers, net_s::neurons, net_s::nn, neuron_s::out, net_s::out, wiring_s::size, wiring_s::src_index, wiring_s::src_layer, wiring_s::src_type, and net_s::wiring.
Referenced by loadnet().
Initializes a new neural network structure.
Initializes a new neural network structure by allocating memory for neurons and layers, and setting initial pointers to NULL.
Validates input parameters and uses memtrack to register allocations for automatic cleanup.
References net_s::layers, and net_s::neurons.
Referenced by loadnet().