Skip to content

Commit e267e88

Browse files
committed
add script
1 parent d2835fb commit e267e88

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1-
# pytorch_image_classification
2-
image classification by pytroch
1+
## Requirements
2+
- Pytorch 1.0
3+
- Python 3.6+
4+
- DALI
5+
```bash
6+
# Train A network with ImageNet64 memory data by dali
7+
./script/data_to_memory.sh imagenet64
8+
python train_dali.py --dataset ImageNet64 --data_path /userhome/temp_data/cifar10 --model_method proxyless_NAS --model_name proxyless_gpu
9+
```

config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class AugmentConfig(BaseConfig):
4343
def build_parser(self):
4444
parser = get_parser("Augment config")
4545
parser.add_argument('--name', default='')
46-
parser.add_argument('--dataset', default='CIFAR10', help='CIFAR10 / MNIST / FashionMNIST')
46+
parser.add_argument('--dataset', default='CIFAR10', help='CIFAR10 / ImageNet64 / FashionMNIST')
4747
parser.add_argument('--data_path', required=False, default='/userhome/data/cifar10',
4848
help='data path')
4949
parser.add_argument('--model_method', default='proxyless_NAS',)

script/data_to_memory.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
mount -t tmpfs -o size=30G tmpfs /userhome/temp_data
3+
if [ "$1" == "imagenet64" ]; then
4+
cp -r /userhome/data/ImageNet64 /userhome/temp_data/
5+
elif [ "$1" == 'imagenet32' ];
6+
then
7+
cp -r /userhome/data/ImageNet32 /userhome/temp_data/
8+
elif [ "$1" == 'imagenet16' ];
9+
then
10+
cp -r /userhome/data/ImageNet16 /userhome/temp_data/
11+
elif [ "$1" == 'cifar10' ];
12+
then
13+
cp -r /userhome/data/cifar10 /userhome/temp_data/
14+
fi

0 commit comments

Comments
 (0)