-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.sh
57 lines (36 loc) · 1.59 KB
/
setup.sh
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
#!/bin/bash
## create file structure
linear_data_dir="LinearExperiment/data"
linear_data_matrix_dir="LinearExperiment/data/MemoryMatrix"
linear_data_COVTYPE_dir="LinearExperiment/data/COVTYPE"
NN_data_dir="NNExperiment/src/data"
NN_data_model_dir="NNExperiment/src/data/model"
NN_data_preMatrix_dir="NNExperiment/src/data/preMatrix"
mkdir $linear_data_dir
mkdir $linear_data_matrix_dir
mkdir $linear_data_COVTYPE_dir
mkdir $NN_data_dir
mkdir $NN_data_model_dir
mkdir $NN_data_preMatrix_dir
## download data
## Linear mdoels data download
# for Covtype
if [ -f "LinearExperiment/data/COVTYPE/covtype.libsvm.binary.scale.bz2" ];then
echo "file: covtype.libsvm.binary.scale.bz2 exists"
else
wget -P LinearExperiment/data/COVTYPE https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/covtype.libsvm.binary.scale.bz2
fi
## NN model data download
## for case: from core dataset downsampled ImageNet to target dataset CIFAR-10, we use the pretrained model from https://arxiv.org/abs/1901.09960, which give a open resource link to download the model, here we download following this way, if download failure, please download manually (imagnet_wrn_baseline_epoch_99.pt) int file <NNExperiment/data/model/pretrain_model>.
## step 1
pip install gdown
## step 2 save pretrain model path to <NNExperiment/data/model/pretrain_model>
gdown https://drive.google.com/drive/folders/10raR7I1hjOl3nuxz1O2yKMzV1jC77r8a -O NNExperiment/data/model/pretrain_model --folder
## data process
# for linear data process
cd LinearExperiment/src/
python dataloder.py
cd ..
cd ..
cd NNExperiment/src/
python data_utils.py