Skip to content

Commit 54c663e

Browse files
committed
Conflicts: run/run_CNN.py
2 parents 5c1adbc + 7d597b5 commit 54c663e

25 files changed

Lines changed: 360 additions & 317 deletions

config/CNN/conv_spec.json

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,35 @@
11
{
2-
3-
"comment" : "layers :: convolution layer configuration",
4-
"layers": [
5-
{
6-
"convmat_dim" : [5,5],
7-
"num_filters" : 100,
8-
"poolsize" : [2,2],
9-
"flatten" : false,
10-
"update" : true
11-
},
12-
{
13-
"convmat_dim" : [4,4],
14-
"num_filters" : 200,
15-
"poolsize" : [2,2],
16-
"flatten" : true,
17-
"update" : true
18-
}
2+
"conv_spec":{
3+
"comment" : "layers :: convolution layer configuration",
4+
"layers": [
5+
{
6+
"convmat_dim" : [5,5],
7+
"num_filters" : 100,
8+
"poolsize" : [2,2],
9+
"flatten" : false,
10+
"update" : true
11+
},
12+
{
13+
"convmat_dim" : [4,4],
14+
"num_filters" : 200,
15+
"poolsize" : [2,2],
16+
"flatten" : true,
17+
"update" : true
18+
}
1919
],
2020

21-
"comment" : "activation :: sigmoid or tanh",
22-
"activation" : "tanh",
21+
"comment" : "activation :: sigmoid or tanh",
22+
"activation" : "tanh",
23+
24+
"comment" : "use_fast :: To use pylearn2 library for faster computation or not",
25+
"use_fast" : false
26+
},
27+
"mlp_spec":{
28+
29+
"comment" : "layers :: hidden layer configuration",
30+
"layers": [500,200],
2331

24-
"comment" : "use_fast :: To use pylearn2 library for faster computation or not",
25-
"use_fast" : false
32+
"comment" : "activation :: sigmoid or tanh",
33+
"activation" : "tanh"
34+
}
2635
}

config/CNN/data_spec.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"random" : true,
77
"random_seed" : 123,
88
"dim_shuffle" : [0,3,2,1],
9-
"batch_size": 256,
109
"keep_flatten" : false,
1110
"reader_type" : "NP"
1211
},
@@ -18,7 +17,6 @@
1817
"random" : true,
1918
"random_seed" : 123,
2019
"dim_shuffle" : [0,3,2,1],
21-
"batch_size": 256,
2220
"keep_flatten" : false,
2321
"reader_type" : "NP"
2422
},
@@ -30,7 +28,6 @@
3028
"random" : true,
3129
"random_seed" : 123,
3230
"dim_shuffle" : [0,3,2,1],
33-
"batch_size": 256,
3431
"keep_flatten" : false,
3532
"reader_type" : "NP"
3633
}

config/CNN/model_conf.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
"comment" : "valid_data (Mandatory) specify the path of the validation data relative to the working directory",
99
"data_spec" : "data_spec.json",
1010

11-
"comment" : "hidden_nnet_spec :: (Mandatory) specify the path of hidden network configuration specification relative to working directory",
12-
"hidden_nnet_spec" : "mlp_spec.json",
13-
14-
"comment" : "conv_nnet_spec :: (Mandatory) specify the path of convolution network configuration specification relative to working directory",
15-
"conv_nnet_spec" : "conv_spec.json",
11+
"comment" : "nnet_spec :: (Mandatory) specify the path of network configuration specification relative to working directory",
12+
"nnet_spec" : "conv_spec.json",
1613

1714
"comment" : "hidden_output_file :: (Mandatory) specify the path of convolution network output file relative to working directory",
1815
"hidden_output_file" : "hidden_out.model",
1916

2017
"comment" : "conv_output_file :: (Mandatory) specify the path of convolution network output file relative to working directory",
2118
"conv_output_file" : "conv_out.model",
2219

20+
"comment" : "conv_output_file :: (Mandatory) specify the path of convolution network output file relative to working directory",
21+
"output_file" : "conv_out.model",
22+
2323
"comment" : "input_shape :: (Mandatory) specify the input shape of a given feature vector" ,
2424
"input_shape" : [3,28,28],
2525

@@ -47,5 +47,13 @@
4747
"min_epoch_decay_start" : 15,
4848
"init_error" :100
4949
},
50+
51+
"processes":{
52+
"pretraining":false,
53+
"finetuning":true,
54+
"testing":true,
55+
"export_data":false
56+
},
57+
5058
"export_path" : "data/export"
5159
}

config/CNN1/data_spec.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"random_seed" : 123,
88
"input_shape" : [1,10,5],
99
"dim_shuffle" : [0,1,2,3],
10-
"batch_size": 8,
1110
"keep_flatten" : false,
1211
"reader_type" : "T1"
1312
},
@@ -20,7 +19,6 @@
2019
"random_seed" : 123,
2120
"input_shape" : [1,10,5],
2221
"dim_shuffle" : [0,1,2,3],
23-
"batch_size": 8,
2422
"keep_flatten" : false,
2523
"reader_type" : "T1"
2624
},
@@ -33,7 +31,6 @@
3331
"random_seed" : 123,
3432
"input_shape" : [1,10,5],
3533
"dim_shuffle" : [0,1,2,3],
36-
"batch_size": 8,
3734
"keep_flatten" : false,
3835
"reader_type" : "T1"
3936
}

config/CNN1/model_conf.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
"comment" : "valid_data (Mandatory) specify the path of the validation data relative to the working directory",
99
"data_spec" : "data_spec.json",
1010

11-
"comment" : "hidden_nnet_spec :: (Mandatory) specify the path of hidden network configuration specification relative to working directory",
12-
"hidden_nnet_spec" : "mlp_spec.json",
13-
1411
"comment" : "conv_nnet_spec :: (Mandatory) specify the path of convolution network configuration specification relative to working directory",
15-
"conv_nnet_spec" : "conv_spec.json",
12+
"nnet_spec" : "conv_spec.json",
1613

1714
"comment" : "hidden_output_file :: (Mandatory) specify the path of convolution network output file relative to working directory",
1815
"hidden_output_file" : "hidden_out.model",
@@ -47,5 +44,13 @@
4744
"min_epoch_decay_start" : 15,
4845
"init_error" :100
4946
},
47+
48+
"processes":{
49+
"pretraining":false,
50+
"finetuning":true,
51+
"testing":true,
52+
"export_data":false,
53+
},
54+
5055
"export_path" : "data/export"
5156
}

config/DBN/data_spec.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
"partition" : 200,
66
"random" : true,
77
"random_seed" : 123,
8-
"dim_shuffle" : [0,3,2,1],
9-
"batch_size": 256,
108
"keep_flatten" : true,
119
"reader_type" : "NP"
1210
},
@@ -17,8 +15,6 @@
1715
"partition" : 200,
1816
"random" : true,
1917
"random_seed" : 123,
20-
"dim_shuffle" : [0,3,2,1],
21-
"batch_size": 256,
2218
"keep_flatten" : true,
2319
"reader_type" : "NP"
2420
},
@@ -29,8 +25,6 @@
2925
"partition" : 200,
3026
"random" : true,
3127
"random_seed" : 123,
32-
"dim_shuffle" : [0,3,2,1],
33-
"batch_size": 256,
3428
"keep_flatten" : true,
3529
"reader_type" : "NP"
3630
}

config/DBN/model_conf.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"data_spec" : "data_spec.json",
1010

1111
"comment" : "rbm_nnet_spec:: (Mandatory) specify the path of RBM network configuration specification relative to working directory",
12-
"rbm_nnet_spec" : "rbm_spec.json",
12+
"nnet_spec" : "rbm_spec.json",
1313

1414
"comment" : "output_file :: (Mandatory) specify the path of RBM network output file relative to working directory",
1515
"output_file" : "rbm_out.model",
@@ -44,7 +44,13 @@
4444
},
4545

4646
"comment" : "finetune_momentum :: Specify the momentum factor while finetuning",
47-
"finetune_momentum": 0.5
48-
47+
"finetune_momentum": 0.5,
48+
49+
"processes":{
50+
"pretraining":false,
51+
"finetuning":true,
52+
"testing":true,
53+
"export_data":false
54+
}
4955

5056
}

config/DBN/rbm_spec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"n_outs":200,
1111

1212
"comment" : "activation :: sigmoid or tanh",
13-
"activation" : "tanh",
13+
"activation" : "sigmoid",
1414

1515
"comment" : "pretrained_layers:number of layers to be pre-trained",
1616
"pretrained_layers" : 5,

config/SDA/data_spec.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
"partition" : 200,
66
"random" : true,
77
"random_seed" : 123,
8-
"dim_shuffle" : [0,3,2,1],
9-
"batch_size": 256,
108
"keep_flatten" : true,
119
"reader_type" : "NP"
1210
},
@@ -17,8 +15,6 @@
1715
"partition" : 200,
1816
"random" : true,
1917
"random_seed" : 123,
20-
"dim_shuffle" : [0,3,2,1],
21-
"batch_size": 256,
2218
"keep_flatten" : true,
2319
"reader_type" : "NP"
2420
},
@@ -29,8 +25,6 @@
2925
"partition" : 200,
3026
"random" : true,
3127
"random_seed" : 123,
32-
"dim_shuffle" : [0,3,2,1],
33-
"batch_size": 256,
3428
"keep_flatten" : true,
3529
"reader_type" : "NP"
3630
}

config/SDA/model_conf.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"data_spec" : "data_spec.json",
1010

1111
"comment" : "sda_nnet_spec:: (Mandatory) specify the path of SDA network configuration specification relative to working directory",
12-
"sda_nnet_spec" : "sda_spec.json",
12+
"nnet_spec" : "sda_spec.json",
1313

1414
"comment" : "output_file :: (Mandatory) specify the path of SDA network output file relative to working directory",
1515
"output_file" : "sda_out.model",
@@ -41,6 +41,12 @@
4141
},
4242

4343
"comment" : "finetune_momentum :: Specify the momentum factor while finetuning",
44-
"finetune_momentum": 0.5
45-
44+
"finetune_momentum": 0.5,
45+
46+
"processes":{
47+
"pretraining":true,
48+
"finetuning":true,
49+
"testing":true,
50+
"export_data":false
51+
}
4652
}

0 commit comments

Comments
 (0)