Skip to main content

PSANN

PSANN is a PyTorch library for regression with trainable sinusoidal activations, composed preprocessing, and episodic optimization. The separate psannlm distribution provides language modeling.

Version 2.0.1 is on the authoritative 2.x API track for both packages. New code should use the typed configuration interfaces shown here. Older constructors and flat configuration inputs are migration-only compatibility routes and are not part of the canonical public surface.

Install from this checkout

Use Python 3.9 or newer. Install a PyTorch build appropriate for your CPU or CUDA runtime before installing PSANN.

python -m pip install -e ".[sklearn]"
# Add language modeling when needed:
python -m pip install ./psannlm

psann depends on NumPy, PyTorch, and PyYAML. Scikit-learn is optional for cloning and model selection. Installing core alone does not install or expose psannlm. See the installation and LM guide for tokenizer and training dependencies.

Regression

import torch  # Initialize PyTorch before optional scientific packages on Windows.
import numpy as np
from psann import PSANNRegressor
from psann.architectures import ArchitectureConfig

X = np.linspace(-1, 1, 64, dtype=np.float32)[:, None]
y = np.sin(3 * X).astype(np.float32)
model = PSANNRegressor(
    architecture=ArchitectureConfig.dense(),
    hidden_layers=1, hidden_units=16, epochs=8,
    batch_size=16, lr=0.01, random_state=7, device="cpu",
)
model.fit(X, y)
predictions = model.predict(X)
model.save("regression.pt")
restored = PSANNRegressor.load("regression.pt", map_location="cpu")
np.testing.assert_allclose(restored.predict(X), predictions, rtol=0, atol=0)

Use nested architecture policies to select residual, convolutional, wave, sequence, or geometric-sparse behavior. Use PreprocessorConfig for LSM composition and EpisodicTrainer(estimator=..., strategy=HISSOConfig(...)) for episodic training. Language modeling uses PSANNLM, PSANNLMDataPrep, LMConfig, and LMArchitectureConfig, with python -m psannlm as its CLI.

Find a workflow

Research examples illustrate experiments; they do not establish general accuracy or performance advantages. Historical result reports are labeled and are not current executable configurations.

Metadata

Release files for psann 2.0.1

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

Source distribution (sdist)

Source distribution for psann 2.0.1
File Size Uploaded Provenance
psann-2.0.1.tar.gz 174.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for psann 2.0.1
File Interpreter ABI Platform
psann-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 396.9 kB

Release files / psann-2.0.1.tar.gz

Download URL psann-2.0.1.tar.gz
Size 174.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4573d7844f8ae51f91c28576ca29d66a9f73e519d94e84e1b8c53b6120d3d8e0
BLAKE2b-256 checksum
How to use checksums
06d3abd01d38fb258b68cec88df803d34b4b0a1c3074802ad3f2cc13c6cbb214
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / psann-2.0.1-py3-none-any.whl

Download URL psann-2.0.1-py3-none-any.whl
Size 222.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f6125acd4abd8e92f1c75c61a9069e8f6a4dae1716d1790d2beecd98956a583e
BLAKE2b-256 checksum
How to use checksums
d78a4ecf309d6535b50f92050742c6cbad59e74db8ac2b51339ba7426af59a8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for psann 2.0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

2.0.1 This release

2 release files No 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