NeuroTIC 0.0
Loading...
Searching...
No Matches
ntcalculate.c File Reference

Implementation of feedforward network computations. More...

#include "ntcalculate.h"
#include "ntactivation.h"
Include dependency graph for ntcalculate.c:

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.
 

Detailed Description

Implementation of feedforward network computations.

Provides weighted sum, activation, and full forward propagation.
Assumes sequential layer-by-layer calculation.

Author
Oscar Sotomayor
Date
2026

Definition in file ntcalculate.c.

Function Documentation

◆ activate()

data_t activate ( neuron_s neuron)

Applies the configured activation function.

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().

◆ feedforward()

data_t * feedforward ( net_s net)

Executes full feedforward propagation.

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().

◆ weighing()

data_t weighing ( neuron_s neuron)

Computes the weighted sum of a 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().