forked from goodfeli/adversarial
-
Notifications
You must be signed in to change notification settings - Fork 3
/
mnist.yaml
109 lines (109 loc) · 3.8 KB
/
mnist.yaml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
!obj:pylearn2.train.Train {
dataset: &train !obj:pylearn2.datasets.mnist.MNIST {
which_set: 'train',
start: 0,
stop: 50000
},
model: !obj:adversarial.AdversaryPair {
generator: !obj:adversarial.Generator {
noise: 'uniform',
monitor_ll: 1,
mlp: !obj:pylearn2.models.mlp.MLP {
layers: [
!obj:pylearn2.models.mlp.RectifiedLinear {
layer_name: 'h0',
dim: 1200,
irange: .05,
},
!obj:pylearn2.models.mlp.RectifiedLinear {
layer_name: 'h1',
dim: 1200,
irange: .05,
},
!obj:pylearn2.models.mlp.Sigmoid {
init_bias: !obj:pylearn2.models.dbm.init_sigmoid_bias_from_marginals { dataset: *train},
layer_name: 'y',
irange: .05,
dim: 784
}
],
nvis: 100,
}},
discriminator:
!obj:pylearn2.models.mlp.MLP {
layers: [
!obj:pylearn2.models.maxout.Maxout {
layer_name: 'h0',
num_units: 240,
num_pieces: 5,
irange: .005,
},
!obj:pylearn2.models.maxout.Maxout {
layer_name: 'h1',
num_units: 240,
num_pieces: 5,
irange: .005,
},
!obj:pylearn2.models.mlp.Sigmoid {
layer_name: 'y',
dim: 1,
irange: .005
}
],
nvis: 784,
},
},
algorithm: !obj:pylearn2.training_algorithms.sgd.SGD {
batch_size: 100,
learning_rate: .1,
learning_rule: !obj:pylearn2.training_algorithms.learning_rule.Momentum {
init_momentum: .5,
},
monitoring_dataset:
{
'valid' : !obj:pylearn2.datasets.mnist.MNIST {
which_set: 'train',
start: 50000,
stop: 60000
},
},
cost: !obj:adversarial.AdversaryCost2 {
scale_grads: 0,
#target_scale: 1.,
discriminator_default_input_include_prob: .5,
discriminator_input_include_probs: {
'h0': .8
},
discriminator_default_input_scale: 2.,
discriminator_input_scales: {
'h0': 1.25
}
},
#!obj:pylearn2.costs.mlp.dropout.Dropout {
# input_include_probs: { 'h0' : .8 },
# input_scales: { 'h0': 1. }
#},
#termination_criterion: !obj:pylearn2.termination_criteria.MonitorBased {
# channel_name: "valid_y_misclass",
# prop_decrease: 0.,
# N: 100
#},
update_callbacks: !obj:pylearn2.training_algorithms.sgd.ExponentialDecay {
decay_factor: 1.000004,
min_lr: .000001
}
},
extensions: [
#!obj:pylearn2.train_extensions.best_params.MonitorBasedSaveBest {
# channel_name: 'valid_y_misclass',
# save_path: "${PYLEARN2_TRAIN_FILE_FULL_STEM}_best.pkl"
#},
!obj:pylearn2.training_algorithms.learning_rule.MomentumAdjustor {
start: 1,
saturate: 250,
final_momentum: .7
}
],
save_path: "${PYLEARN2_TRAIN_FILE_FULL_STEM}.pkl",
save_freq: 1
}