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.0 is the authoritative 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 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

psann-2.0.0.tar.gz (174.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

psann-2.0.0-py3-none-any.whl (222.0 kB view details)

Uploaded Python 3

File details

Details for the file psann-2.0.0.tar.gz.

File metadata

  • Download URL: psann-2.0.0.tar.gz
  • Upload date:
  • Size: 174.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for psann-2.0.0.tar.gz
Algorithm Hash digest
SHA256 4590a690c46b333f2158e0a27860a91538271f573beb448d4b2bd14b83d36654
MD5 adffe3064c255edab71998dd83d2e57a
BLAKE2b-256 5a17a125ed20eaf1aaa4831d375182bb40a5398190ee0eaf1d60583a8844e2d0

See more details on using hashes here.

File details

Details for the file psann-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: psann-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 222.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for psann-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4969c75b3c048ebdaf53f6e3ac8d3fdade28d71412f61a4c45d6341701452ea
MD5 05606d49d330e89e3434a3446c381bca
BLAKE2b-256 fdb1d6071575242a058cc2b50e3c6c4ba94c425153521c6215853514b8006b52

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.1

2 files

This release

2.0.0 This release

2 files

0.12.7

2 files

0.12.4

2 files

0.12.3

2 files

0.12.2

2 files

0.12.1

2 files

0.12.0

2 files

0.10.19

2 files

0.10.18

2 files

0.10.17

2 files

0.10.16

2 files

0.10.15

2 files

0.10.14

2 files

0.10.13

2 files

0.10.12

1 file

0.10.11

2 files

0.10.10

2 files

0.10.9

2 files

0.10.8

2 files

0.10.7

2 files

0.10.6

2 files

0.10.5

2 files

0.10.4

2 files

0.10.3

2 files

0.10.1

2 files

0.10.0

2 files

0.9.19

2 files

0.9.18

2 files

0.9.17

2 files

0.9.16

2 files

0.9.15

2 files

0.9.14

2 files

0.9.13

2 files

0.9.12

2 files

0.9.11

2 files

0.9.10

2 files

0.9.9

2 files

0.9.8

2 files

0.9.7

2 files

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