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.1.0 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.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 psann 2.1.0
File Size Uploaded Provenance Actions
psann-2.1.0.tar.gz 172.8 kB Without provenance Details for psann-2.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 393.7 kB

Release files / psann-2.1.0.tar.gz

Download URL psann-2.1.0.tar.gz
Size 172.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b126537b68c2be88a5aa7ee0b271a97b304c08e19361b29824379553317cdd4b
BLAKE2b-256 checksum
How to use checksums
64c9de65c170f6710f49c571af59930554d21fa74ee388cdc8bd572bd4a83d98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL psann-2.1.0-py3-none-any.whl
Size 220.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81df1119f11aa49b0ad5483c217e75482fad7f21d096d4b159b40a625930e3d9
BLAKE2b-256 checksum
How to use checksums
f26f4c8142936f614491beff0823ddf60a0ed06304b6a8c05f01b589f39578a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for psann 2.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.

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.1.0 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