|
NeuroTIC 0.0
|
Computation Module.
https://tituxdev.github.io/NeuroTIC/src/CPU/ntcalculate.c.
More...
#include "ntcore.h"

Go to the source code of this file.
Functions | |
| data_t | weighing (neuron_s *neuron) |
| Computes the weighted sum of a neuron. | |
| data_t | activate (neuron_s *neuron) |
| Applies the configured activation function. | |
| data_t * | feedforward (net_s *net) |
| Executes full feedforward propagation. | |
Computation Module.
https://tituxdev.github.io/NeuroTIC/src/CPU/ntcalculate.c.
Provides weighted sum, activation, and full forward propagation.
Assumes sequential layer-by-layer calculation.
Definition in file ntcalculate.h.
| data_t activate | ( | neuron_s * | neuron | ) |
Applies the configured activation function.
| neuron | Pointer to the neuron. |
Activation functions are resolved from the global ntact_activation lookup table using the neuron's configured activation identifier.
Result is stored in the neuron's out field.
References neuron_s::fn, ntact_activation, neuron_s::out, and weighing().
Referenced by feedforward().
| data_t * feedforward | ( | net_s * | net | ) |
Executes full feedforward propagation.
| net | Pointer to the network. |
Iterates layer-by-layer to maintain deterministic ordering.
No buffering is required since outputs of previous layers are already wired via pointer connections.
References activate(), net_s::layers, net_s::neurons, net_s::nn, and net_s::out.
Referenced by backpropagation().
| data_t weighing | ( | neuron_s * | neuron | ) |
Computes the weighted sum of a neuron.
| neuron | Pointer to the neuron. |
Calculates the weighted sum of a neuron by iterating over its inputs and weights.
weighted_sum = Σ(input_i * weight_i) + bias
The bias term is accumulated first to reduce one addition inside the loop.
Inputs are assumed to be valid pointers.
References neuron_s::b, neuron_s::in, neuron_s::inputs, and neuron_s::w.
Referenced by activate().