File size: 1,346 Bytes
162d97c 052b4b7 162d97c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
---
license: mit
language:
- en
library_name: pytorch
pipeline_tag: image-classification
tags:
- pytorch
- densenet
- cnn
- cifar10
- image-classification
- computer-vision
datasets:
- cifar10
---
# DenseNet on CIFAR-10
A PyTorch implementation of a DenseNet architecture trained from scratch on the CIFAR-10 dataset.
## Model Details
- Architecture: DenseNet
- Framework: PyTorch
- Dataset: CIFAR-10
- Input Size: 3 × 32 × 32
- Classes: 10
- Growth Rate: 32
## CIFAR-10 Classes
| Label | Class |
|------:|--------|
| 0 | airplane |
| 1 | automobile |
| 2 | bird |
| 3 | cat |
| 4 | deer |
| 5 | dog |
| 6 | frog |
| 7 | horse |
| 8 | ship |
| 9 | truck |
## Training
- Optimizer: SGD
- Learning Rate: 0.1
- Momentum: 0.9
- Weight Decay: 5e-4
- Scheduler: StepLR
- Loss: CrossEntropyLoss
- Epochs: 30
- Batch Size: 128
## Performance
| Metric | Value |
|--------|------:|
| Test Accuracy | 88.77% |
| Test Accuracy (DP) | 88.77% |
## Model Files
- `densenet_cifar10.pth`
## Load Model
```python
model = DenseNet()
model.load_state_dict(
torch.load("densenet_cifar10.pth")
)
model.eval()
```
## Inference
```python
with torch.no_grad():
outputs = model(images)
_, predicted = torch.max(outputs, 1)
```
## Author
Ankit Bari
- GitHub: https://github.com/aijadugar
- Hugging Face: https://huggingface.co/aijadugar
|