AlirezaMahDev.Extensions.Brain 0.0.1-alpha7

This is a prerelease version of AlirezaMahDev.Extensions.Brain.
dotnet add package AlirezaMahDev.Extensions.Brain --version 0.0.1-alpha7
                    
NuGet\Install-Package AlirezaMahDev.Extensions.Brain -Version 0.0.1-alpha7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AlirezaMahDev.Extensions.Brain" Version="0.0.1-alpha7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AlirezaMahDev.Extensions.Brain" Version="0.0.1-alpha7" />
                    
Directory.Packages.props
<PackageReference Include="AlirezaMahDev.Extensions.Brain" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AlirezaMahDev.Extensions.Brain --version 0.0.1-alpha7
                    
#r "nuget: AlirezaMahDev.Extensions.Brain, 0.0.1-alpha7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AlirezaMahDev.Extensions.Brain@0.0.1-alpha7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AlirezaMahDev.Extensions.Brain&version=0.0.1-alpha7&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=AlirezaMahDev.Extensions.Brain&version=0.0.1-alpha7&prerelease
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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