Catalog PyPI
PACKAGE EXPLORERView in registry

ai-dan-core

PyPI

CPU-based neural network library written in C++

cppdeep-learningmachine-learningmnistneural-network
Versions collected1
Direct dependencies0From release 0.1.4
Last observed21 Oct, 10:22 UTC

README

Version 0.1.4 documentation

ai-dan-core

High-performance neural network library with C++ backend and Python bindings.

Features

  • Fast C++ backend with adaptive multi-threading
  • Simple Python API for easy integration
  • Built-in MNIST support for quick experimentation
  • Flexible architecture supporting multiple activation functions and loss functions
  • Model persistence - save and load trained models

Installation

pip install ai-dan-core

Quick Start

import ai_dan

# Create a neural network
network = ai_dan.Network([784, 256, 128, 10],
                         ai_dan.LEAKY_RELU,
                         ai_dan.SOFTMAX)

# Configure training
optimizer = ai_dan.Optimizer(learning_rate=0.001, batch_size=32)
loss = ai_dan.CrossEntropy()

# Train on MNIST
trainer = ai_dan.Trainer(network, optimizer, loss)
trainer.train(ai_dan.MNIST())

# Save the model
network.save("model.ai-dan")

# Load and benchmark
loaded = ai_dan.Network.load("model.ai-dan")
benchmarker = ai_dan.Benchmarker(loaded, ai_dan.MNISTBenchmark())
benchmarker.benchmark()

Activation Functions

  • ai_dan.SIGMOID
  • ai_dan.RELU
  • ai_dan.LEAKY_RELU
  • ai_dan.TANH
  • ai_dan.SOFTMAX

Loss Functions

  • ai_dan.MSE (Mean Squared Error)
  • ai_dan.CROSS_ENTROPY

Training with Callbacks

Monitor training progress with custom callbacks:

def on_step(step, loss_val, input_vec, label_vec, output_vec):
    if step % 1000 == 0:
        print(f"Step {step}, Loss: {loss_val:.4f}")

trainer = ai_dan.Trainer(network, optimizer, loss, on_step)
trainer.train(mnist_data)

Performance

  • Training on MNIST: ~20 seconds for 60,000 samples
  • Throughput: ~3,000 samples/second
  • Typical accuracy: 96%+ on MNIST test set

Requirements

  • Python 3.8+
  • C++23 compatible compiler (GCC 13+, Clang 16+)

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.44 Jan 20260

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
a-mackey/ai-dan-core

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:22 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:73a6065eaecd0d649b63aff2c2645944fd11b1135cda5c3daa2c8760c69676dd