Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
HubHop committed Mar 28, 2023
1 parent 7c4e353 commit b52b5c8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ With only a few epochs of training, SN-Net effectively interpolates between the

SN-Net is a general framework. However, as different model families are trained differently, we use their own code for stitching experiments. In this repo, we provide examples for plain ViTs and hierarchical ViTs by stitching DeiT and Swin, respectively.

To use our repo, we suggest creating a Python virtual environment.

```bash
conda create -n snnet python=3.9
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113
pip install fvcore
pip install timm==0.6.12
```

Next, you can feel free to experiment with different settings.

For DeiT-based experiments, please refer to [stitching_deit](./stitching_deit).

For Swin-based experiments, please refer to [stitching_swin](./stitching_swin).
Expand Down
3 changes: 2 additions & 1 deletion stitching_resnet_swin/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,5 @@ output/
*.gz
Untitled.ipynb
Testing notebook.ipynb
output/*
output/*
logs/*
2 changes: 0 additions & 2 deletions stitching_resnet_swin/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,6 @@ def main():
_logger.info(
f'Scheduled epochs: {num_epochs}. LR stepped per {"epoch" if lr_scheduler.t_in_epochs else "update"}.')

with open('resnet_swin_args_training.json', 'w') as f:
json.dump(vars(args), f, indent=4)

try:
for epoch in range(start_epoch, num_epochs):
Expand Down

0 comments on commit b52b5c8

Please sign in to comment.