|
| 1 | +# NeuralForge CLI - Quick Reference |
| 2 | + |
| 3 | +## Installation |
| 4 | + |
| 5 | +```bash |
| 6 | +# Install the package |
| 7 | +pip install -e . |
| 8 | + |
| 9 | +# Verify installation |
| 10 | +NeuralForgeAI --help |
| 11 | +``` |
| 12 | + |
| 13 | +## Available Commands |
| 14 | + |
| 15 | +| Command | Description | Example | |
| 16 | +|---------|-------------|---------| |
| 17 | +| `NeuralForgeAI` | Train neural networks | `NeuralForgeAI --dataset cifar10 --model resnet18 --epochs 50` | |
| 18 | +| `neuralforge` | Same as NeuralForgeAI | `neuralforge --dataset stl10 --model resnet18` | |
| 19 | +| `neuralforge-train` | Explicit training | `neuralforge-train --dataset mnist --epochs 20` | |
| 20 | +| `neuralforge-test` | Test models | `neuralforge-test --help` | |
| 21 | +| `neuralforge-gui` | Launch GUI | `neuralforge-gui` | |
| 22 | +| `neuralforge-nas` | Architecture search | `neuralforge-nas --help` | |
| 23 | + |
| 24 | +## Quick Examples |
| 25 | + |
| 26 | +### Basic Training |
| 27 | +```bash |
| 28 | +# CIFAR-10 with ResNet18 |
| 29 | +NeuralForgeAI --dataset cifar10 --model resnet18 --epochs 50 --batch-size 64 |
| 30 | + |
| 31 | +# STL-10 with custom settings |
| 32 | +NeuralForgeAI --dataset stl10 --model resnet18 --epochs 100 --lr 0.001 --batch-size 64 |
| 33 | + |
| 34 | +# MNIST quick test |
| 35 | +NeuralForgeAI --dataset mnist --model simple --epochs 10 |
| 36 | +``` |
| 37 | + |
| 38 | +### Advanced Usage |
| 39 | +```bash |
| 40 | +# Full customization |
| 41 | +NeuralForgeAI --dataset cifar100 --model resnet18 --epochs 100 \ |
| 42 | + --batch-size 128 --lr 0.001 --optimizer adamw \ |
| 43 | + --scheduler cosine --device cuda --seed 42 |
| 44 | + |
| 45 | +# Using config file |
| 46 | +NeuralForgeAI --config my_config.json |
| 47 | + |
| 48 | +# Synthetic data for testing |
| 49 | +NeuralForgeAI --dataset synthetic --num-samples 1000 --epochs 5 |
| 50 | +``` |
| 51 | + |
| 52 | +## Common Arguments |
| 53 | + |
| 54 | +| Argument | Type | Default | Description | |
| 55 | +|----------|------|---------|-------------| |
| 56 | +| `--dataset` | str | synthetic | Dataset name (cifar10, mnist, stl10, etc.) | |
| 57 | +| `--model` | str | simple | Model architecture (simple, resnet18, efficientnet, vit) | |
| 58 | +| `--epochs` | int | 50 | Number of training epochs | |
| 59 | +| `--batch-size` | int | 32 | Batch size for training | |
| 60 | +| `--lr` | float | 0.001 | Learning rate | |
| 61 | +| `--optimizer` | str | adamw | Optimizer (adamw, adam, sgd) | |
| 62 | +| `--scheduler` | str | cosine | LR scheduler (cosine, onecycle, none) | |
| 63 | +| `--device` | str | auto | Device (cuda, cpu) | |
| 64 | +| `--seed` | int | 42 | Random seed | |
| 65 | + |
| 66 | +## Supported Datasets |
| 67 | + |
| 68 | +- `cifar10` - CIFAR-10 (60K images, 10 classes, 32x32) |
| 69 | +- `cifar100` - CIFAR-100 (60K images, 100 classes, 32x32) |
| 70 | +- `mnist` - MNIST (70K images, 10 classes, 28x28) |
| 71 | +- `fashion_mnist` - Fashion-MNIST (70K images, 10 classes, 28x28) |
| 72 | +- `stl10` - STL-10 (13K images, 10 classes, 96x96) |
| 73 | +- `tiny_imagenet` - Tiny ImageNet (200 classes, 64x64) |
| 74 | +- `synthetic` - Synthetic data for testing |
| 75 | + |
| 76 | +## Comparison: CLI vs Python Script |
| 77 | + |
| 78 | +### Using CLI (After pip install) |
| 79 | +```bash |
| 80 | +# Use from anywhere |
| 81 | +NeuralForgeAI --dataset stl10 --model resnet18 --epochs 50 --batch-size 64 |
| 82 | +``` |
| 83 | + |
| 84 | +**Pros:** |
| 85 | +- ✅ Use from any directory |
| 86 | +- ✅ Clean, simple syntax |
| 87 | +- ✅ No need to write Python code |
| 88 | +- ✅ Easy to integrate in scripts/workflows |
| 89 | + |
| 90 | +### Using Python Script (Traditional) |
| 91 | +```bash |
| 92 | +# Must be in NeuralForge directory |
| 93 | +python train.py --dataset stl10 --model resnet18 --epochs 50 --batch-size 64 |
| 94 | +``` |
| 95 | + |
| 96 | +**Pros:** |
| 97 | +- ✅ Works without installation |
| 98 | +- ✅ Easy to modify for custom needs |
| 99 | + |
| 100 | +## Getting Help |
| 101 | + |
| 102 | +```bash |
| 103 | +# Show all available options |
| 104 | +NeuralForgeAI --help |
| 105 | + |
| 106 | +# Get help for specific commands |
| 107 | +neuralforge-train --help |
| 108 | +neuralforge-test --help |
| 109 | +neuralforge-nas --help |
| 110 | +``` |
| 111 | + |
| 112 | +## Documentation |
| 113 | + |
| 114 | +- **[README.md](README.md)** - Overview and features |
| 115 | +- **[INSTALL_CLI.md](INSTALL_CLI.md)** - Detailed installation guide |
| 116 | +- **[QUICKSTART.md](QUICKSTART.md)** - Quick start guide with examples |
| 117 | +- **[DOCUMENTATION.md](DOCUMENTATION.md)** - Complete API reference |
| 118 | +- **[DATASETS.md](DATASETS.md)** - Dataset information |
| 119 | + |
| 120 | +## Troubleshooting |
| 121 | + |
| 122 | +### Command not found |
| 123 | +If `NeuralForgeAI` is not recognized: |
| 124 | +1. Make sure you installed the package: `pip install -e .` |
| 125 | +2. Check pip's scripts are in PATH |
| 126 | +3. Use full Python path: `python -m neuralforge.cli.train` |
| 127 | + |
| 128 | +### Import errors |
| 129 | +Install required dependencies: |
| 130 | +```bash |
| 131 | +pip install torch torchvision numpy matplotlib tqdm pillow scipy tensorboard |
| 132 | +``` |
| 133 | + |
| 134 | +### CUDA issues |
| 135 | +For CPU-only installation: |
| 136 | +```bash |
| 137 | +pip install --no-build-isolation -e . |
| 138 | +``` |
0 commit comments