--hidden
🦉 AthenaAI is an AI-powered ensemble machine-learning trading bot for PocketOption, built on BinaryOptionsToolsV2 → Get it on GitLab
💬 Need help? Join the Chipa Discord · ⚡ Go no-code with ChipaEditor
Hidden layer sizes for the neural model, as a comma-separated list of integers.
| Type | string, parsed to a tuple of ints |
| Default | 128,64 |
| Maps to | TrainerConfig.nn_hidden |
| Read in | train.py (parsing) → src/training/trainer.py (Trainer._train_nn()) → src/training/torch_model.py (TorchMLPClassifier._build_net()) |
What it does
train.py parses the string before building the config:
hidden = tuple(int(h) for h in args.hidden.split(",") if h.strip())
so "128,64" becomes (128, 64); blank segments are ignored (a trailing comma is harmless), but non-numeric segments raise ValueError. The tuple flows into TorchMLPClassifier(hidden=...), and _build_net() (src/training/torch_model.py) builds one block per entry:
input → [Linear(prev, h) → ReLU → Dropout(0.2)] per h → Linear(last, 2)
The input size is the feature-vector length (set at fit() time); the output is 2 logits (PUT/CALL). Dropout is fixed at 0.2 per hidden layer.
The architecture is also pickled into the brain: at load time the network is rebuilt from hidden plus the stored CPU state dict, so the same tuple travels with the file.
Choosing a value
128,64(two layers, tapering) is a sensible size for the modest feature vector; the training guide’s “bigger” recipe is256,128,64.- More/larger layers increase capacity, training time, and GPU memory (
--batch-sizeis the other memory knob); dropout and the ensemble’s holdout-accuracy weighting limit — but don’t remove — overfitting risk. - A single layer (
--hidden 64) is valid. An empty value (--hidden "") produces logistic regression on the features (input straight to the 2-logit output layer) — legal but rarely what you want.
Examples
python train.py --hidden 256,128,64 --epochs 60 --lr 5e-4
python train.py --hidden 64 # small, fast netpython train.py --hidden "256,128,64"Interactions
--epochs,--lr— bigger networks usually want more epochs and/or a lower LR.--batch-size— lower it if a large network hits GPU out-of-memory.--no-nn— makes this flag a no-op.
See also
💬 Unsure how this interacts with the rest of the configuration? Ask in the Chipa Discord — or prototype strategies no-code with ChipaEditor.