|
Download README.md from ByteJoseph/SolveQ: direct link, hf CLI and curl.
- Browser
- Download file 787 Bytes
-
https://huggingface.co/ByteJoseph/SolveQ/resolve/main/README.md
- Command line
-
hf download hf://ByteJoseph/SolveQ/README.md
-
curl -L -o README.md https://huggingface.co/ByteJoseph/SolveQ/resolve/main/README.md
787 Bytes
| license: mit | |
| metrics: | |
| - accuracy | |
| # SolveQ | |
| Simple neural network that learns `y = 2x + 3`. Built with PyTorch. | |
| ## What it does | |
| Trains a small network to approximate a linear function. The model has one hidden layer and learns from synthetic data. | |
| ## Setup | |
| ```bash | |
| pip install -r requirements.txt | |
| ``` | |
| ## Running | |
| Train the model: | |
| ```bash | |
| python src/train.py | |
| ``` | |
| This generates 200 samples, trains for 1000 epochs, shows the loss plot, and saves to `models/model.pt`. | |
|  | |
| Make predictions: | |
| ```bash | |
| python src/predict.py | |
| ``` | |
| Predicts `x = 4.0` by default. To test other values, edit the `predict()` call in `predict.py`. | |
| ## Model | |
| - Input: 1 neuron | |
| - Hidden: 16 neurons (ReLU) | |
| - Output: 1 neuron | |
| Uses Adam optimizer (lr=0.01) and MSE loss. |