![]() |
Deepity
Ultra-fast, SIMD-accelerated Predictive Coding
|
C++ port of the Python StreamAlignedBatcher – builds batches with a fixed number of examples per class, grouped together, required for I_avg's per-class averaging (Eq. 7 of "Faster Predictive Coding Networks via Better Initialization"). More...
#include <vector>#include <random>#include <cstring>#include <stdexcept>Go to the source code of this file.
Classes | |
| class | Deep::StreamAlignedBatcher |
| Builds batches with a fixed, grouped number of examples per class – see the file-level note for why this exists and what it deliberately doesn't own. More... | |
Namespaces | |
| namespace | Deep |
| This file exists to provide both Tensor.h and IComputeBackend.h with device types without introducing circular dependencies. | |
C++ port of the Python StreamAlignedBatcher – builds batches with a fixed number of examples per class, grouped together, required for I_avg's per-class averaging (Eq. 7 of "Faster Predictive Coding Networks via Better Initialization").
Kept deliberately SEPARATE from DiscriminativePCNetwork/SimplePCNetwork/ ConvPCNetwork – this is a standalone data-pipeline utility, not part of the core numerical library. Any consumer (C++, or via future bindings) uses it independently, feeding its output into whichever network class they're using via the existing ClampInput/ClampState-style API.
Does NOT own or copy the dataset – holds pointers + stride info only. Caller must keep X/Y/labels alive for the batcher's lifetime. GetBatch() gathers selected rows into caller-provided output buffers, so the same buffers can be reused across calls without repeated allocation.