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

Implementation of backpropagation training for NeuroTIC networks. More...

#include "nttrain.h"
#include "ntactivation.h"
#include "ntcalculate.h"
#include "ntmemory.h"
#include <stdlib.h>
#include <string.h>
#include <math.h>
Include dependency graph for nttrain.c:

Go to the source code of this file.

Functions

void newtraindata (traindata_t *train_data, net_s *net)
 Allocates memory for training data arrays.
 
attempts_t backpropagation (net_s *net, traindata_t *train_data)
 Trains a network using backpropagation.
 

Detailed Description

Implementation of backpropagation training for NeuroTIC networks.

Provides functions to allocate training datasets and train feedforward networks using standard backpropagation.

Author
Oscar Sotomayor
Date
2026

Definition in file nttrain.c.

Function Documentation

◆ backpropagation()

attempts_t backpropagation ( net_s net,
traindata_t train_data 
)

Trains a network using backpropagation.

Implements the backpropagation algorithm to train the network. For each training sample:

  • Computes outputs via feedforward.
  • Calculates errors for each neuron.
  • Propagates deltas backward and updates weights and biases.
  • Repeats until error is below tolerance or max_attempts is reached.

References feedforward(), net_s::layers, traindata_t::max_attempts, net_s::neurons, traindata_t::samples, and traindata_t::tolerance.

◆ newtraindata()

void newtraindata ( traindata_t train_data,
net_s net 
)

Allocates memory for training data arrays.

Allocates memory for training data arrays.
Initializes in and results arrays based on the network structure and number of samples.

References net_s::layers, and traindata_t::samples.