Add scaling option to nn_fromdata.py script
@JasonBernstein1 is already working on this.
Since May 20, 2026.
- Dominant language
- Python
- Stars
- 6
- Forks
- 2
- Avg merge
- 20m
- Merged PRs (30d)
- 2
Description
Training a neural net on the borehole dataset gives nan loss values, e.g.,
```
./nn_fromdata.py --hidden_sizes 60 60 -n 600 -l 0.02 -b 40 -d borehole
```
Initially scaling the inputs and outputs to [0, 1] fixes the issue, so we should add a scaling option to the script, and give an example in the script's docstring. This is also consistent with scaling or normalization in our other scripts, e.g., `gp_fromdata.py`.
It would also make sense for the training to immediately stop after obtaining a nan loss value, and printing a suitable error message.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.