![]() |
pydeepity
Python bindings for Deepity
|
Python bindings for Deepity, a Predictive Coding (PC) neural network library. This page documents the deepity package (the pure-Python layer users actually import — distributed on PyPI as pydeepity), which wraps the compiled deepity extension module built from Deepity's C++ engine.
For the underlying C++ API, see the main Deepity documentation. For install/build instructions, see the GitHub README.
More complete, runnable examples live in examples/ (e.g. examples/xor.py, examples/train_mnist_deep.py).
Each class wraps a templated C++ network and exposes a common configure() / train_step() / predict() / fit() surface:
Passed positionally to a network's constructor to describe its architecture:
deepity._backend.dy is the raw compiled nanobind extension; everything in Networks and Architecture Building Blocks above wraps it. A handful of standalone utilities are re-exported directly, with no wrapper class: StreamAlignedBatcher, get_l2_cache_bytes, auto_batch_size, dynamic_thread, the omp_* thread-count queries, and the in-place SIMD activation functions (relu/drelu/tanh/dtanh/sigmoid/dsigmoid).