Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
phamquiluan committed Aug 5, 2020
1 parent 80314e6 commit d3f9a58
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,43 @@
This implements training of [Residual Attention Network](https://arxiv.org/abs/1704.06904) on the ImageNet dataset, and provide the pretrained weights.


# Install

```bash
pip install 'git+ssh://git@github.com/phamquiluan/ResidualAttentionNetwork.git@v0.0.1'
```

# Quickstart

```python
import torch
from resattnet import resattnet56

m = resattnet56(in_channels=3, num_classes=10) # pretrained is load automatically

tensor = torch.Tensor(1, 3, 224, 224)

output = m(tensor)

print(output.shape) # torch.Size([1, 10])
```

## Pretrained Download

Download resattnet56 pretrained Imagenet1K: [link](https://drive.google.com/file/d/1Sc-TCERxrJKN4TvmDOwn_98GeUva_FIr/view?usp=sharing)

Eval: Acc@1 77.024 Acc@5 93.574


## Requirements


## Training

- Install PyTorch ([pytorch.org](http://pytorch.org))
- `pip install -r requirements.txt`
- Download the ImageNet dataset from http://www.image-net.org/
- Then, and move validation images to labeled subfolders, using [the following shell script](https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/valprep.sh)
## Training
- Then, and move validation images to labeled subfolders, using [the following shell script](https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/valprep.sh)


To train a model, run `main.py` with the desired model architecture and the path to the ImageNet dataset:

Expand Down

0 comments on commit d3f9a58

Please sign in to comment.