Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.1.1 instead.
Reason given by maintainers: Wheels only support AVX512

AffineFlow-NN

PyPI version Python Build system Bindings

A high-performance, fully native C++ Neural Network engine exposed to Python via pybind11.

Designed for rapid experimentation without the Python Global Interpreter Lock (GIL) overhead, AffineFlow-NN executes the entire deep learning training loop strictly in native C++ using Eigen. It utilizes a zero-allocation flat-memory Autograd graph, AVX SIMD vectorization, and dynamically compiled OpenBLAS to achieve massive speedups over mainstream Python frameworks.

Highlights

  • Dual Execution Modes: Train dynamic graphs using the @nn.eager decorator for zero-allocation step-by-step execution, or compile static graphs with JITCompiler for maximum throughput.
  • Dynamic Hardware Dispatch: Automatically detects your CPU at runtime to dispatch highly optimized AVX2 or AVX-512 instructions.
  • CNN & Modern Layer Support: Built-in support for Conv2dLayer, MaxPool2dLayer, AvgPool2dLayer, FlattenLayer, BatchNorm1dLayer, DropoutLayer, and Leaky ReLUs.
  • Zero-Allocation Autograd: Uses arena allocation (Tape) and flat contiguous memory structs to dynamically build computational graphs without heap allocations.

Installation

Install the released wheel from PyPI:

pip install AffineFlow-NN

Quick Start: Building a CNN

import numpy as np
import affineflow_nn as nn

X_train = np.random.rand(100, 1, 64, 64).astype(np.float32)
y_train = np.eye(40, dtype=np.float32)[np.random.choice(40, 100)]

class AffineFlowNNDeepCNN(nn.Module):
    def __init__(self, in_h, in_w, num_classes):
        super().__init__()
        self.conv1 = nn.Conv2dLayer(1, 16, in_h, in_w, kernel_size=5, stride=1, pad=2)
        self.act1 = nn.LeakyReLULayer(0.01)
        self.pool1 = nn.MaxPool2dLayer(16, in_h, in_w, kernel_size=2, stride=2, pad=0)
        
        out_h1, out_w1 = in_h // 2, in_w // 2
        self.conv2 = nn.Conv2dLayer(16, 32, out_h1, out_w1, kernel_size=3, stride=1, pad=1)
        self.act2 = nn.LeakyReLULayer(0.01)
        self.pool2 = nn.MaxPool2dLayer(32, out_h1, out_w1, kernel_size=2, stride=2, pad=0)
        
        out_h2, out_w2 = out_h1 // 2, out_w1 // 2
        self.flatten = nn.FlattenLayer()
        self.fc = nn.DenseLayer(32 * out_h2 * out_w2, num_classes)

    def forward(self, x):
        x = self.pool1(self.act1(self.conv1(x)))
        x = self.pool2(self.act2(self.conv2(x)))
        x = self.flatten(x)
        return self.fc(x)

model = AffineFlowNNDeepCNN(64, 64, 40)
optimizer = nn.Adam(learning_rate=0.001)
optimizer.set_parameters(model.parameters())
loss_fn = nn.SoftmaxCrossEntropyLoss()

trainer = nn.JITCompiler(model, optimizer, loss_fn)
dataloader = nn.DataLoader(X_train, y_train, batch_size=32, shuffle=True, drop_last=True)
trainer.fit(dataloader, epochs=40, verbose=False)
trainer.save_checkpoint("faces_model")

Latest Benchmark Results

Benchmark Task Scikit-Learn PyTorch (ATen) AffineFlow-NN (Eager) AffineFlow-NN (C++ JIT) Max Speedup (vs PyTorch)
Deep Regression (Housing) MSE: 0.2811
Time: 4.94s
MSE: 0.2720
Time: 13.32s
MSE: 0.2662
Time: 2.47s
MSE: 0.2669
Time: 4.02s
5.39x
Deep CNN (Faces) N/A Acc: 98.75%
Time: 15.19s
Acc: 98.75%
Time: 12.17s
Acc: 98.75%
Time: 11.22s
1.35x

Metadata

Release files for AffineFlow-NN 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for AffineFlow-NN 0.1.0
File Size Uploaded Provenance
affineflow_nn-0.1.0.tar.gz 55.4 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for AffineFlow-NN 0.1.0
File
affineflow_nn-0.1.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
affineflow_nn-0.1.0-cp314-cp314t-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 26.0+ ARM64 Details
affineflow_nn-0.1.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
affineflow_nn-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
affineflow_nn-0.1.0-cp314-cp314-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64 Details
affineflow_nn-0.1.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
affineflow_nn-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
affineflow_nn-0.1.0-cp313-cp313-macosx_26_0_arm64.whl CPython 3.13 CPython 3.13 macOS 26.0+ ARM64 Details
affineflow_nn-0.1.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
affineflow_nn-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
affineflow_nn-0.1.0-cp312-cp312-macosx_26_0_arm64.whl CPython 3.12 CPython 3.12 macOS 26.0+ ARM64 Details

Total release size: 57.8 MB

Release files / affineflow_nn-0.1.0.tar.gz

Download URL affineflow_nn-0.1.0.tar.gz
Size 55.4 kB
Tags Source
SHA-256 checksum
How to use checksums
90c81d5ff1bda3c4886da028a351b5884460f276ba35bcb90f356be3f07d695e
BLAKE2b-256 checksum
How to use checksums
73303291ff9da59c9761bc18636d4a220eb45487dddafdacf56af5d46137565b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / affineflow_nn-0.1.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL affineflow_nn-0.1.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 13.3 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ff79ba5e858224c11123bc4ccc469e63b89e890c0052658fe7493ff4d2a8c1e7
BLAKE2b-256 checksum
How to use checksums
001c356b200bcb3b5548493b94f87e246d56e2d3c06d82322ba8144ae3ffdf3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / affineflow_nn-0.1.0-cp314-cp314t-macosx_26_0_arm64.whl

Download URL affineflow_nn-0.1.0-cp314-cp314t-macosx_26_0_arm64.whl
Size 538.9 kB
Tags CPython 3.14 CPython 3.14 free-threading macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
df9a9b755b2b638adfaef71c04bcf1bc96138e508a95433a574e0302901be74c
BLAKE2b-256 checksum
How to use checksums
4d698fcbaa4081153aceceb2da6f8bae5c04eaebac77a2b6b7d4a51afd09e7fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / affineflow_nn-0.1.0-cp314-cp314-win_amd64.whl

Download URL affineflow_nn-0.1.0-cp314-cp314-win_amd64.whl
Size 871.8 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
06ccfe9d3c30b33dce5f81b5fa85096421875a4bafc77b52a25efc7011eb90f1
BLAKE2b-256 checksum
How to use checksums
970df20ca1ea222d576e30b0da60f4253687b42cd9ba78e037583ecf8099e78c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / affineflow_nn-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL affineflow_nn-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 13.3 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f700f26c7994199c53dca458b64177474d0381e2b582462e79f38c06a2973429
BLAKE2b-256 checksum
How to use checksums
108c2b9bea32a921bb5b228640af11e63648b5dd4bc023ce72b5c25cae6fdfdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / affineflow_nn-0.1.0-cp314-cp314-macosx_26_0_arm64.whl

Download URL affineflow_nn-0.1.0-cp314-cp314-macosx_26_0_arm64.whl
Size 523.4 kB
Tags CPython 3.14 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
ff0e553228814d891f0dd73346e14d56b3eb5952355c5d04ad096cb2acdd153b
BLAKE2b-256 checksum
How to use checksums
b55a633934dc0238e11002146e2fca2a10b8716c8c8f9a80e39faec86e820a1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / affineflow_nn-0.1.0-cp313-cp313-win_amd64.whl

Download URL affineflow_nn-0.1.0-cp313-cp313-win_amd64.whl
Size 845.6 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
4a551c4c564bf66afacd6ce73a3ac11e8c513630ac405ccdbba5536050681a26
BLAKE2b-256 checksum
How to use checksums
b2a9173db5fdf18d6146cfe5941dd336366aff2d5c365da5f0c863855593a0a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / affineflow_nn-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL affineflow_nn-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 13.3 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ccd611127008956cc13e4ff13cd12ddad2a9e07e52aac790d3dd427f6335595b
BLAKE2b-256 checksum
How to use checksums
6eeb8fa21752e453bb7a058dd00e24933feb5cf5a448c653d857dab4e32fa509
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / affineflow_nn-0.1.0-cp313-cp313-macosx_26_0_arm64.whl

Download URL affineflow_nn-0.1.0-cp313-cp313-macosx_26_0_arm64.whl
Size 522.7 kB
Tags CPython 3.13 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
69467697a0becfcc04acb15b87c3bb4e537bf1bbed9dc786d287f59eeec3504c
BLAKE2b-256 checksum
How to use checksums
eb2259e59e7a5ce9a428d75aad19894b72cb6aa7a66d7697b64fd8afbd06a222
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / affineflow_nn-0.1.0-cp312-cp312-win_amd64.whl

Download URL affineflow_nn-0.1.0-cp312-cp312-win_amd64.whl
Size 845.5 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
053348cad0d9337b4ac766b494b4620bb6996d9694f2cd7504aa8e8b38b158be
BLAKE2b-256 checksum
How to use checksums
67a2176ce3435b7890efffd306f7f14afd03a41b6d76d1242a5028bab73663f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / affineflow_nn-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL affineflow_nn-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 13.3 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ed85b234c41972e408c1db10edd72109a630da882420ec2f90f1c36e5d11520c
BLAKE2b-256 checksum
How to use checksums
7e34ee41937db89dc17456d331ff22bc4feef5db2911af43e14eab3d70c222be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / affineflow_nn-0.1.0-cp312-cp312-macosx_26_0_arm64.whl

Download URL affineflow_nn-0.1.0-cp312-cp312-macosx_26_0_arm64.whl
Size 522.7 kB
Tags CPython 3.12 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
fca452e8d642099d3d46d7bce9ee01e3642cf39f021e7bf6838f3affaeb7f1fc
BLAKE2b-256 checksum
How to use checksums
f5020061f5b65b1f35fedc1c803315c225b4df70b91883cbf6e0be460d9304e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Security for AffineFlow-NN 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 12 files in this release have been uploaded with provenance metadata.

Select from 12 files

Attestation for affineflow_nn-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

12 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page