AlirezaMahDev.Extensions.Brain
0.0.1-alpha7
dotnet add package AlirezaMahDev.Extensions.Brain --version 0.0.1-alpha7
NuGet\Install-Package AlirezaMahDev.Extensions.Brain -Version 0.0.1-alpha7
<PackageReference Include="AlirezaMahDev.Extensions.Brain" Version="0.0.1-alpha7" />
<PackageVersion Include="AlirezaMahDev.Extensions.Brain" Version="0.0.1-alpha7" />
<PackageReference Include="AlirezaMahDev.Extensions.Brain" />
paket add AlirezaMahDev.Extensions.Brain --version 0.0.1-alpha7
#r "nuget: AlirezaMahDev.Extensions.Brain, 0.0.1-alpha7"
#:package AlirezaMahDev.Extensions.Brain@0.0.1-alpha7
#addin nuget:?package=AlirezaMahDev.Extensions.Brain&version=0.0.1-alpha7&prerelease
#tool nuget:?package=AlirezaMahDev.Extensions.Brain&version=0.0.1-alpha7&prerelease
d# AlirezaMahDev.Extensions.Brain
Project Description
This project implements a neural network infrastructure with a focus on high-performance computation, leveraging ILGPU for GPU acceleration. It provides a flexible and extensible framework for building and training neural networks with support for custom data types and network architectures.
Dependencies
Project Dependencies
- AlirezaMahDev.Extensions.Brain.Abstractions: Core interfaces and contracts
- AlirezaMahDev.Extensions.DataManager: Data management and persistence
- AlirezaMahDev.Extensions.ParameterInstance: Parameter handling and configuration
- AlirezaMahDev.Extensions: Core extension infrastructure
NuGet Dependencies
- ILGPU (v1.5.3): High-performance GPU computing
- ILGPU.Algorithms (v1.5.3): GPU-accelerated algorithms
Key Components
Nerve
The Nerve<TData> class is the central component that manages the neural network. It provides:
- Neural network training and inference capabilities
- Thread-safe operations for concurrent access
- Integration with data management for persistence
- GPU acceleration through ILGPU
Neuron
The Neuron<TData> class represents individual neurons in the network, featuring:
- Support for generic data types (unmanaged)
- Thread-safe caching mechanism
- Connection management to other neurons
- Efficient memory management
Connection
Connection handling between neurons, including:
- Weighted connections
- Bi-directional relationships
- Connection persistence
Factory Classes
- NeuronFactory: Creates and manages neuron instances
- ConnectionFactory: Handles creation and management of connections
- BrainBuilder: Fluent API for configuring the brain extension
Usage Example
// Configure services
services.AddBrain(builder =>
{
// Configure brain components
builder.AddNerve<MyDataType>("nerve1");
// Additional configuration...
});
// Resolve and use
var nerve = serviceProvider.GetRequiredService<INerve<MyDataType>>();
nerve.Learn(trainingData);
var result = nerve.Predict(inputData);
Performance Considerations
- Utilizes GPU acceleration through ILGPU for computationally intensive operations
- Implements efficient memory management for large neural networks
- Thread-safe design for concurrent access
- Optimized data structures for fast neural network operations
Architecture
The project follows a modular architecture with clear separation of concerns:
- Data Layer: Handles persistence and retrieval of neural network data
- Core Logic: Implements neural network operations and algorithms
- Infrastructure: Provides GPU acceleration and performance optimizations
- API Layer: Exposes a clean, type-safe interface for consumers
Configuration
Configuration can be done through the BrainBuilder class, which provides a fluent API for setting up the neural network with various options and parameters.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- AlirezaMahDev.Extensions (>= 0.0.1-alpha7)
- AlirezaMahDev.Extensions.Brain.Abstractions (>= 0.0.1-alpha7)
- AlirezaMahDev.Extensions.DataManager (>= 0.0.1-alpha7)
- AlirezaMahDev.Extensions.ParameterInstance (>= 0.0.1-alpha7)
- ILGPU (>= 1.5.3)
- ILGPU.Algorithms (>= 1.5.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.1-alpha7 | 400 | 12/8/2025 |
| 0.0.1-alpha | 273 | 12/7/2025 |