Add configurable dropout to ResBlocks
Wire a dropout hyperparameter (default 0.1) through the config, model, training pipeline, and CLI. Persisted in saved model_config so checkpoints reconstruct the architecture correctly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ def main() -> None:
|
||||
parser.add_argument("--hidden-dim", type=int)
|
||||
parser.add_argument("--n-blocks", type=int)
|
||||
parser.add_argument("--emb-dim", type=int)
|
||||
parser.add_argument("--dropout", type=float, help="Dropout probability in ResBlocks (default: 0.1)")
|
||||
parser.add_argument("--val-fraction", type=float)
|
||||
parser.add_argument("--seed", type=int, help="Random seed for reproducibility")
|
||||
parser.add_argument("--validate-every", type=int,
|
||||
@@ -37,6 +38,7 @@ def main() -> None:
|
||||
}.items() if v is not None}
|
||||
cli_model = {k: v for k, v in {
|
||||
"hidden_dim": args.hidden_dim, "n_blocks": args.n_blocks, "emb_dim": args.emb_dim,
|
||||
"dropout": args.dropout,
|
||||
}.items() if v is not None}
|
||||
config_path = Path(args.config) if args.config else None
|
||||
cfg = gconfig.merge_cli_overrides(gconfig.DEFAULT_CONFIG, config_path, cli_train, cli_model)
|
||||
|
||||
Reference in New Issue
Block a user