Repository navigation
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Author
|
recheck |
Author
|
I signed it! |
…/load, dark mode - nn.ts: pluggable optimizer (SGD/Momentum/RMSProp/Adam) with gradient clipping and learning-rate decay, replacing the plain SGD-only update step. Adds LeakyReLU/ELU/Swish activations, inverted dropout on hidden layers during training, an EarlyStopping helper, and JSON serialize/deserialize for a trained network's weights and biases. - state.ts/playground.ts/index.html: wire the above into the UI (optimizer dropdown, dropout slider, early-stopping checkbox, save/load model buttons using File/Blob APIs) and add a dark mode toggle persisted to localStorage. - styles.css: dark mode via a page-wide invert filter, with the classification/regression color-coded regions (heatmap, network diagram, dataset thumbnails, loss chart, color legend) counter-inverted so their colors keep their original meaning. Multi-class classification support and CSV/JSON dataset import were scoped out of this change: multi-class would require rebuilding the single-output network architecture, decision-boundary heatmap and dataset generators, and dataset import was dropped as an unnecessary file-handling attack surface for this pass.
EyobelG
force-pushed
the
feat/optimizers-activations-regularization
branch
from
October 23, 2026 00:47
82e2113 to
351723d
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nn.ts: pluggable optimizer (SGD / Momentum / RMSProp / Adam) with gradient clipping and learning-rate decay, replacing the plain-SGD-only update step. Adds LeakyReLU/ELU/Swish activations, inverted dropout on hidden layers during training, anEarlyStoppinghelper, and JSON serialize/deserialize for a trained network's weights and biases.state.ts/playground.ts/index.html: wires all of the above into the UI — optimizer dropdown, dropout slider, early-stopping checkbox, save/load-model buttons (File/Blob APIs) — plus a dark-mode toggle persisted tolocalStorage.styles.css: dark mode via a page-wide invert filter, with the classification/regression color-coded regions (heatmap, network diagram, dataset thumbnails, loss chart, color legend) counter-inverted so their colors keep their original meaning.All changes are additive: every new control defaults to the prior behavior (optimizer defaults to
sgd, dropout defaults to0, early stopping defaults off, theme defaults tolight), so existing shared URLs/state render identically to before.Scoped out
Test plan
npx browserify src/playground.ts -p "[tsify]" -o dist/bundle.jscompiles clean with the project's existing TS 2.9/tsify toolchain.Happy to split this into smaller PRs per feature if that's easier to review.