![]() |
Deepity
Ultra-fast, SIMD-accelerated Predictive Coding
|
DiscriminativePCLayer with precision entirely removed. More...
#include <vector>#include <stdexcept>#include <random>#include <memory>#include <cstdlib>#include <deepity/utils/Activations.h>#include <deepity/utils/AdamOptimizer.h>#include <deepity/layers/Layer.h>#include <deepity/utils/DeviceMemoryArena.h>#include <deepity/utils/MemoryArena.h>#include <deepity/backend/IComputeBackend.h>Go to the source code of this file.
Classes | |
| class | Deep::SimplePCLayer |
| Predictive Coding layer without precision weighting – the simpler, unweighted-energy counterpart to DiscriminativePCLayer. More... | |
Namespaces | |
| namespace | Deep |
| This file exists to provide both Tensor.h and IComputeBackend.h with device types without introducing circular dependencies. | |
DiscriminativePCLayer with precision entirely removed.
Precision weighting (p, log_p, UpdatePrecision()) was found this session to be an unused cost, not a benefit: every real training run used pr=0.0 (precision inert – p stays permanently at 1, log_p at 0), yet UpdatePrecision() was still called unconditionally every train_step(), and every layer paid for the p buffer, the log_p buffer, and the precision-weighted energy formula's extra multiply/log term on every single CalculateState()/UpdateState() call, for zero behavioral benefit.
This class removes all of that: energy reduces to plain E = 0.5*sum(e^2) (no precision weighting, no -0.5*log(p) term), and UpdateState()'s own term reduces to dz_dt = -e (no p multiplier, since p=1 always made that multiplication a no-op anyway).
Mirrors DiscriminativePCLayer's public interface as closely as possible (same AddLayer-style construction pattern, same ActivationType-based constructor, same GetBeliefs/GetErrors/GetWeights/GetBiases accessors) so it's a near-drop-in swap for anyone not using precision – which, per the above, was everyone.