|
Download README.md from NeuralNine999/INET: direct link, hf CLI and curl.
- Browser
- Download file 1.38 kB
-
https://huggingface.co/NeuralNine999/INET/resolve/main/README.md
- Command line
-
hf download hf://NeuralNine999/INET/README.md
-
curl -L -o README.md https://huggingface.co/NeuralNine999/INET/resolve/main/README.md
1.38 kB
| license: mit | |
| datasets: | |
| - scikit-learn/iris | |
| language: | |
| - en | |
| base_model: | |
| - NeuralNine999/INET | |
| pipeline_tag: tabular-classification | |
| tags: | |
| - biology | |
| # INet - PyTorch Iris Classifier | |
| ## Overview | |
| INet is a simple fully-connected neural network trained on the Iris dataset using PyTorch. | |
| It classifies iris flowers into 4 categories based on 4 features: sepal length, sepal width, petal length, and petal width. | |
| ## Model Architecture | |
| - Input: 4 features | |
| - Hidden layers: 64 β 32 β 16 β 8 neurons (ReLU activations) | |
| - Output: 4 classes | |
| Architecture flow: | |
| Input(4) β Linear(64) β ReLU β Linear(32) β ReLU β Linear(16) β ReLU β Linear(8) β ReLU β Linear(4) | |
| - Loss: CrossEntropyLoss | |
| - Optimizer: Adam, lr=0.01 | |
| - Epochs: 30 | |
| ## Files | |
| - inet.pth β Trained model weights | |
| - model.py β Contains INet class and architecture | |
| - README.md β This file | |
| ## How to Load | |
| ```python | |
| import torch | |
| from model import INet # make sure INet class is in model.py | |
| model = INet() | |
| model.load_state_dict(torch.load("inet.pth")) | |
| model.eval() | |
| # Example usage: | |
| sample_input = torch.tensor([[5.1, 3.5, 1.4, 0.2]]) | |
| pred = model(sample_input) | |
| pred_class = pred.argmax(dim=1).item() | |
| print(pred_class) | |
| ``` | |
| ## Notes | |
| * Make sure PyTorch is installed correctly | |
| ```python | |
| pip install torch | |
| ``` | |
| * The model expects input as a tensor of shape [batch_size, 4] with float32 values. |