TNeuralNetworkHandler — Neural Networks in Ascoos OS

Author: Christos Drogkidis Date: 08-10-2025 18:42 🇬🇷


Introduction

TNeuralNetworkHandler is the native class in Ascoos OS for building, training, and evaluating neural networks. It fully supports deep learning architectures and operates without external libraries or cloud dependencies.

Integrated into the Web5 Kernel, it works seamlessly with macro scripts, semantic profilers, and DSL commands. This documentation outlines its capabilities, supported architectures, and practical examples.

TNeuralNetworkHandler Documentation
TNeuralNetworkHandler — Deep Learning in Ascoos OS

1️⃣ Network Capabilities



2️⃣ Supported Network Types

TNeuralNetworkHandler supports multiple neural network architectures, offering flexibility and adaptability across tasks:

All networks can be combined, trained, and evaluated natively without external libraries. The class also supports custom layers and activation functions.



3️⃣ Usage Examples

Below are practical examples of how to use TNeuralNetworkHandler in real-world scenarios:

3.1 Creating and Training a Network

$nn = new TNeuralNetworkHandler();
$nn->addLayer('dense', ['units' => 128, 'activation' => 'relu']);
$nn->addLayer('dense', ['units' => 64, 'activation' => 'relu']);
$nn->addLayer('dense', ['units' => 10, 'activation' => 'softmax']);
$nn->compile(['optimizer' => 'adam', 'loss' => 'categoricalCrossEntropy']);
$nn->fit($data, $labels, ['epochs' => 20, 'batchSize' => 32]);
        


3.2 Evaluating Performance

$metrics = $nn->evaluate($testData, $testLabels);
echo $metrics['accuracy']; // e.g., 0.87
        


3.3 Predicting with a Trained Network

$prediction = $nn->predict($newInput);
print_r($prediction); // Array of probabilities or labels
        


4️⃣ Integration with Web5

TNeuralNetworkHandler is deeply integrated into the Web5 Kernel of Ascoos OS, enabling neural networks to participate in semantic and autonomous workflows.

This integration transforms Ascoos OS into a native deep learning platform, where logic and learning are core system capabilities.



📚 References



✍️ Written by Christos Drogkidis — Developer, thinker, and advocate of logic-driven software design.