Skip to content

Commit

Permalink
add cifar download bash
Browse files Browse the repository at this point in the history
  • Loading branch information
jaychoi12 committed Jun 2, 2021
1 parent 421a6d1 commit 4591ffd
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 8 deletions.
22 changes: 18 additions & 4 deletions dividemix/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# DivideMix With Winning Tickets
We add some commands for either CLK or SAME by refering to the original code from https://github.com/LiJunnan1992/DivideMix.
# Semi-Supervised Learning based Approaches
Overall code structure is made from original DivideMix repo.
We refer to https://github.com/LiJunnan1992/DivideMix.

## Dataset
### CIFAR10, CIFAR100
To download CIFAR dataset, just follow

```
bash scripts/download_cifar10.sh
bash scripts/download_cifar100.sh
```

### Clothing1M


## Training
To run scripts or python file, you have to download cifar-10 or cifar-100 datasets, firstly.
Expand All @@ -17,7 +31,7 @@ Run the followings:

bash scripts/refinement_dynamic_cifar10

### arguments
<!-- ### arguments
Default arguments settings are set for cifar10 experiments. Usage and other arguments are same with DivideMix original code. Options below are added only for our paper.
```
Expand All @@ -29,6 +43,6 @@ usage : python Train_cifar.py [--distill] [--distill_mode] [--refinement]
--refinement : if not, the clean probability of all clean subset is set to one. In our paper, all experiments always use this option to make same condition with original paper.
```

-->
<b>License</b>\
This project is licensed under the terms of the MIT license.
5 changes: 1 addition & 4 deletions dividemix/Train_cifar.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,8 @@ def extract_cleanidx(model, loader, mode='fine-kmeans', p_threshold=0.6):
if args.dataset=='cifar10':
warm_up = 20
elif args.dataset=='cifar100':
<<<<<<< Updated upstream
warm_up = 50
=======
warm_up = 45
>>>>>>> Stashed changes


loader = dataloader.cifar_dataloader(args.dataset,r=args.r,noise_mode=args.noise_mode,batch_size=args.batch_size,num_workers=5,\
root_dir=args.data_path,log=stats_log,noise_file='%s/%.1f_%s.json'%(args.data_path,args.r,args.noise_mode))
Expand Down
6 changes: 6 additions & 0 deletions dividemix/scripts/download_cifar10.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

wget https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz
tar -zxvf cifar-10-python.tar.gz
mv cifar-10-batches-py/ cifar-10/
rm cifar-10-python.tar.gz
6 changes: 6 additions & 0 deletions dividemix/scripts/download_cifar100.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

wget https://www.cs.toronto.edu/~kriz/cifar-100-python.tar.gz
tar -zxvf cifar-100-python.tar.gz
mv cifar-100-python/ cifar-100/
rm cifar-100-python.tar.gz

0 comments on commit 4591ffd

Please sign in to comment.