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

Implementation Random Initialization. More...

#include "ntinitialize.h"
#include "ntactivation.h"
#include <stdlib.h>
#include <time.h>
Include dependency graph for ntinitialize.c:

Go to the source code of this file.

Functions

void randnet (net_s *net)
 Randomly initializes network weights.
 

Detailed Description

Implementation Random Initialization.

Initializes all neuron weights within their activation function's specified range and sets biases to zero.
Uses rand() seeded with the current time.

Author
Oscar Sotomayor
Date
2026

Definition in file ntinitialize.c.

Function Documentation

◆ randnet()

void randnet ( net_s net)

Randomly initializes network weights.

Iterates through each layer and neuron in the network, assigning random weights based on the activation function's defined range in ntact_rand_range.
Biases are set to zero for all neurons.
The random values are generated using the standard rand() function, scaled to the appropriate range for each activation function.

References neuron_s::b, neuron_s::fn, neuron_s::inputs, net_s::layers, net_s::neurons, net_s::nn, ntact_rand_range, and neuron_s::w.