--- 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.