StackCreator::fromFile/AStack::loadWeights now append "/prj/<name>"
themselves (the prj/<name>/ restructure), expecting dir to be the repo
root -- which poet.cpp and the GUI's startup auto-load already pass.
But the Load button's file chooser used the picked file's own parent
folder (e.g. prj/prims/) as dir, so after the refactor it looked for
prj/prims/prj/prims/prims.prj, threw an uncaught Json::RuntimeError, and
took the whole process down.
Reproduced by actually launching the GUI, clicking Load, and picking
prj/prims/prims.prj -- confirmed the crash, then confirmed the fix with
the identical click sequence (project loads, weight visualizations
render correctly).
Fix: recover the repo root by going up three levels from the picked
file (file -> its project folder -> "prj" folder -> root) and store it
in m_dir, instead of using the file's immediate parent. This also fixes
a separate dormant bug: m_dir was never updated after loading a
different project through this dialog, so Save/Save Training would have
silently written to whatever m_dir happened to be (always "."),
regardless of which project was actually loaded.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016K8Gu7Qejd11JbdiHZqYAs
Visible captions "Lambda" and "Weight decay" renamed to "L1 Lambda" and
"L2 Lambda" in both the main params panel (MainComponent.cpp) and the
per-layer view (RbmComponent.cpp), matching the backend Rbm::Params
field names (l1Lambda, l2Lambda).
lambdaLabel's change handler was a dead stub (tooltip said "Unused",
body did nothing) -- wired it up to write params().l1Lambda, mirroring
weightDecayLabel's existing l2Lambda handler. Also added the matching
lambdaLabel->setText(...) sync in updateControls(), which weightDecay
already had but lambdaLabel never did, so the field now actually
displays the loaded value instead of always showing its default.
Verified by launching the GUI and screenshotting it: both labels render
correctly, values populate, no layout/truncation issues.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016K8Gu7Qejd11JbdiHZqYAs
Rbm::Params::weightDecay is now applied directly to the weights outside
the momentum recursion (previous commit), exactly like the newly-added
l1Lambda and matching pyRBM's l2_lambda -- same lambda*W gradient form,
same decoupled-from-momentum treatment. The two are functionally the
same mechanism in this codebase, so name it accordingly. Renamed the
Params field, its JSON key, and the two GUI references in
MainComponent.cpp that read/write it (the "weightDecayLabel" widget
identifier and its JUCE-generated marker comment are left as-is --
cosmetic, not part of the actual API).
Existing .prj files still have a "weightDecay" JSON key; fromJson()
no longer reads it, so it's silently ignored on load. Harmless today
since every current project has it set to 0.0 (confirmed: unchanged
poet.elf output, unchanged test-suite results). Not migrating the .prj
files themselves in this change.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016K8Gu7Qejd11JbdiHZqYAs
- load / store training batch with context
- on load: add context part to legacy training batches
- removed Rbm::setBatch()
git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@790 b431acfa-c32f-4a4a-93f1-934dc6c82436
- create: use numHidden from prev. layer for numVisible of layer to be created
- fixed enable/disable of layers
git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@665 b431acfa-c32f-4a4a-93f1-934dc6c82436