Skip to content

Commit

Permalink
Add experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
vdumoulin committed May 8, 2014
1 parent 03aa4cd commit bd2c881
Show file tree
Hide file tree
Showing 4 changed files with 238 additions and 2 deletions.
50 changes: 48 additions & 2 deletions experiments/timit/rnn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,65 @@
},
model: !obj:research.code.pylearn2.models.rnn.ToyRNN {
nvis: *frame_length,
nhid: 100,
nhid: &nhid 200,
hidden_transition_model: !obj:pylearn2.models.mlp.MLP {
batch_size: 1,
# nvis: *nhid,
input_space: !obj:pylearn2.space.Conv2DSpace {
shape: [*nhid, 1],
num_channels: 1
},
layers: [
!obj:pylearn2.models.mlp.ConvRectifiedLinear {
layer_name: 'c1',
output_channels: 5,
kernel_shape: [50, 1],
pool_shape: [10, 1],
pool_stride: [1, 1],
pool_type: 'max',
irange: .005,
tied_b: True,
},
!obj:pylearn2.models.mlp.ConvRectifiedLinear {
layer_name: 'c2',
output_channels: 5,
kernel_shape: [10, 1],
pool_shape: [2, 1],
pool_stride: [1, 1],
pool_type: 'max',
irange: .005,
tied_b: True,
},
!obj:pylearn2.models.mlp.Linear {
layer_name: 'h',
dim: *nhid,
irange: .005,
},
],
},
irange: 0.001,
non_linearity: 'tanh'
},
algorithm: !obj:pylearn2.training_algorithms.sgd.SGD {
batch_size: 1,
learning_rate: .01,
learning_rate: 0.1,
learning_rule: !obj:research.code.pylearn2.training_algorithms.learning_rule.GradientClipping {
max_magnitude: 1.0,
rescale: 1,
},
monitoring_dataset: {
'train': *train,
},
cost: !obj:research.code.pylearn2.models.rnn.RNNCost {},
termination_criterion: !obj:pylearn2.termination_criteria.EpochCounter {
max_epochs: 500,
},
update_callbacks: [
!obj:pylearn2.training_algorithms.sgd.ExponentialDecay {
decay_factor: 1.0015,
min_lr: 0.01
}
],
},
save_path: "./rnn.pkl",
save_freq: 10,
Expand Down
81 changes: 81 additions & 0 deletions experiments/timit/rnn_phone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
!obj:pylearn2.train.Train {
dataset: &train !obj:research.code.pylearn2.datasets.timit.TIMITPerPhone {
phone: 'aa',
frame_length: &frame_length 240,
max_examples: 1,
unit_norm: True,
standardize: True
},
model: !obj:research.code.pylearn2.models.rnn.ToyRNNPhone {
nvis: *frame_length,
nhid: &nhid 100,
# use_ground_truth: 0,
hidden_transition_model: !obj:pylearn2.models.mlp.MLP {
batch_size: 1,
# nvis: *nhid,
input_space: !obj:pylearn2.space.Conv2DSpace {
shape: [*nhid, 1],
num_channels: 1
},
layers: [
!obj:pylearn2.models.mlp.ConvRectifiedLinear {
layer_name: 'c1',
output_channels: 5,
kernel_shape: [50, 1],
pool_shape: [10, 1],
pool_stride: [1, 1],
pool_type: 'max',
irange: .005,
tied_b: True,
},
!obj:pylearn2.models.mlp.ConvRectifiedLinear {
layer_name: 'c2',
output_channels: 5,
kernel_shape: [10, 1],
pool_shape: [2, 1],
pool_stride: [1, 1],
pool_type: 'max',
irange: .005,
tied_b: True,
},
!obj:pylearn2.models.mlp.Linear {
layer_name: 'h',
dim: *nhid,
irange: .005,
},
],
},
irange: 0.005,
non_linearity: 'tanh'
},
algorithm: !obj:pylearn2.training_algorithms.sgd.SGD {
batch_size: 200000,
learning_rate: 0.05,
learning_rule: !obj:research.code.pylearn2.training_algorithms.learning_rule.CensorLearningRule {
censors: [
!obj:research.code.pylearn2.training_algorithms.learning_rule.GradientClipping {
max_magnitude: 1.0,
rescale: 1,
},
],
learning_rule: !obj:pylearn2.training_algorithms.learning_rule.Momentum {
init_momentum: 0.95,
},
},
monitoring_dataset: {
'train': *train,
},
cost: !obj:research.code.pylearn2.models.rnn.RNNCost {},
termination_criterion: !obj:pylearn2.termination_criteria.EpochCounter {
max_epochs: 1000,
},
update_callbacks: [
!obj:pylearn2.training_algorithms.sgd.ExponentialDecay {
decay_factor: 1.0015,
min_lr: 0.001
}
],
},
save_path: "./rnn_phone.pkl",
save_freq: 10,
}
81 changes: 81 additions & 0 deletions experiments/timit/rnn_phone_prime.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
!obj:pylearn2.train.Train {
dataset: &train !obj:research.code.pylearn2.datasets.timit.TIMITPerPhone {
phone: 'aa',
frame_length: &frame_length 240,
max_examples: 1,
unit_norm: True,
standardize: True
},
model: !obj:research.code.pylearn2.models.rnn.ToyRNNPhone {
nvis: *frame_length,
nhid: &nhid 100,
use_ground_truth: 0,
hidden_transition_model: !obj:pylearn2.models.mlp.MLP {
batch_size: 1,
# nvis: *nhid,
input_space: !obj:pylearn2.space.Conv2DSpace {
shape: [*nhid, 1],
num_channels: 1
},
layers: [
!obj:pylearn2.models.mlp.ConvRectifiedLinear {
layer_name: 'c1',
output_channels: 5,
kernel_shape: [50, 1],
pool_shape: [10, 1],
pool_stride: [1, 1],
pool_type: 'max',
irange: .005,
tied_b: True,
},
!obj:pylearn2.models.mlp.ConvRectifiedLinear {
layer_name: 'c2',
output_channels: 5,
kernel_shape: [10, 1],
pool_shape: [2, 1],
pool_stride: [1, 1],
pool_type: 'max',
irange: .005,
tied_b: True,
},
!obj:pylearn2.models.mlp.Linear {
layer_name: 'h',
dim: *nhid,
irange: .005,
},
],
},
irange: 0.005,
non_linearity: 'tanh'
},
algorithm: !obj:pylearn2.training_algorithms.sgd.SGD {
batch_size: 200000,
learning_rate: 0.05,
learning_rule: !obj:research.code.pylearn2.training_algorithms.learning_rule.CensorLearningRule {
censors: [
!obj:research.code.pylearn2.training_algorithms.learning_rule.GradientClipping {
max_magnitude: 1.0,
rescale: 1,
},
],
learning_rule: !obj:pylearn2.training_algorithms.learning_rule.Momentum {
init_momentum: 0.95,
},
},
monitoring_dataset: {
'train': *train,
},
cost: !obj:research.code.pylearn2.models.rnn.RNNCost {},
termination_criterion: !obj:pylearn2.termination_criteria.EpochCounter {
max_epochs: 1000,
},
update_callbacks: [
!obj:pylearn2.training_algorithms.sgd.ExponentialDecay {
decay_factor: 1.0015,
min_lr: 0.001
}
],
},
save_path: "./rnn_phone_prime.pkl",
save_freq: 10,
}
28 changes: 28 additions & 0 deletions experiments/timit/rnn_prime.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
!obj:pylearn2.train.Train {
dataset: &train !obj:research.code.pylearn2.datasets.timit.TIMITSequences {
which_set: 'train',
frame_length: &frame_length 200,
start: 0,
stop: 1,
},
model: !obj:research.code.pylearn2.models.rnn.ToyRNN {
nvis: *frame_length,
nhid: 1000,
non_linearity: 'tanh',
irange: 0.005,
use_ground_truth: 1,
},
algorithm: !obj:pylearn2.training_algorithms.sgd.SGD {
batch_size: 1,
learning_rate: 1e-2,
monitoring_dataset: {
'train': *train,
},
cost: !obj:research.code.pylearn2.models.rnn.RNNCost {},
termination_criterion: !obj:pylearn2.termination_criteria.EpochCounter {
max_epochs: 500,
},
},
save_path: "./rnn_prime.pkl",
save_freq: 10,
}

0 comments on commit bd2c881

Please sign in to comment.