forked from goodfeli/adversarial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cifar10_fully_connected.yaml
114 lines (114 loc) · 4.03 KB
/
cifar10_fully_connected.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
110
111
112
113
114
!obj:pylearn2.train.Train {
dataset: &train !obj:pylearn2.datasets.cifar10.CIFAR10 {
gcn: 55.,
which_set: 'train',
start: 0,
stop: 40000
},
model: !obj:adversarial.AdversaryPair {
generator: !obj:adversarial.Generator {
mlp: !obj:pylearn2.models.mlp.MLP {
layers: [
!obj:pylearn2.models.mlp.RectifiedLinear {
layer_name: 'gh0',
dim: 8000,
irange: .05,
},
!obj:pylearn2.models.mlp.Sigmoid {
layer_name: 'h1',
dim: 8000,
irange: .05,
},
!obj:pylearn2.models.mlp.Linear {
# init_bias: !obj:pylearn2.models.dbm.init_sigmoid_bias_from_marginals { dataset: *train},
layer_name: 'y',
irange: .5,
dim: 3072
}
],
nvis: 100,
}},
discriminator:
!obj:pylearn2.models.mlp.MLP {
layers: [
!obj:pylearn2.models.maxout.Maxout {
layer_name: 'dh0',
num_units: 1600,
num_pieces: 5,
irange: .005,
},
!obj:pylearn2.models.maxout.Maxout {
layer_name: 'h1',
num_units: 1600,
num_pieces: 5,
irange: .005,
},
!obj:pylearn2.models.mlp.Sigmoid {
layer_name: 'y',
dim: 1,
irange: .005
}
],
nvis: 3072,
},
},
algorithm: !obj:pylearn2.training_algorithms.sgd.SGD {
batch_size: 100,
learning_rate: .025,
learning_rule: !obj:pylearn2.training_algorithms.learning_rule.Momentum {
init_momentum: .5,
},
monitoring_dataset:
{
#'train' : *train,
'valid' : !obj:pylearn2.datasets.cifar10.CIFAR10 {
gcn: 55.,
which_set: 'train',
start: 40000,
stop: 50000
},
#'test' : !obj:pylearn2.datasets.cifar10.CIFAR10 {
# which_set: 'test',
# gcn: 55.,
# }
},
cost: !obj:adversarial.AdversaryCost2 {
scale_grads: 0,
#target_scale: .1,
discriminator_default_input_include_prob: .5,
discriminator_input_include_probs: {
'dh0': .8
},
discriminator_default_input_scale: 2.,
discriminator_input_scales: {
'dh0': 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
}