Skip to content

Instantly share code, notes, and snippets.

@EderSantana
Created March 12, 2014 22:59
Show Gist options
  • Save EderSantana/9518339 to your computer and use it in GitHub Desktop.
Save EderSantana/9518339 to your computer and use it in GitHub Desktop.
Test tied biases for ConvMaxoutC01B
!obj:pylearn2.train.Train {
dataset: &train !obj:pylearn2.datasets.mnist.MNIST {
which_set: 'train',
one_hot: 1,
axes: ['c', 0, 1, 'b'],
start: 0,
stop: 50000
},
model: !obj:pylearn2.models.mlp.MLP {
batch_size: 128,
layers: [
!obj:pylearn2.models.maxout.MaxoutConvC01B {
layer_name: 'h0',
num_channels: 64,
num_pieces: 1,
min_zero: True,
tied_b: True,
kernel_shape: [8, 8],
pool_shape: [4, 4],
pool_stride: [2, 2],
irange: .005,
max_kernel_norm: .9,
},
!obj:pylearn2.models.mlp.Softmax {
max_col_norm: 1.9365,
layer_name: 'y',
n_classes: 10,
irange: .005
}
],
input_space: !obj:pylearn2.space.Conv2DSpace {
shape: [28, 28],
num_channels: 1,
axes: ['c', 0, 1, 'b'],
},
},
algorithm: !obj:pylearn2.training_algorithms.sgd.SGD {
learning_rate: .05,
learning_rule: !obj:pylearn2.training_algorithms.learning_rule.Momentum {
init_momentum: .5,
},
monitoring_dataset:
{
'valid' : !obj:pylearn2.datasets.mnist.MNIST {
axes: ['c', 0, 1, 'b'],
which_set: 'train',
one_hot: 1,
start: 50000,
stop: 60000
},
'test' : !obj:pylearn2.datasets.mnist.MNIST {
axes: ['c', 0, 1, 'b'],
which_set: 'test',
one_hot: 1
},
},
termination_criterion: !obj:pylearn2.termination_criteria.EpochCounter {
max_epochs: 100
},
update_callbacks: !obj:pylearn2.training_algorithms.sgd.ExponentialDecay {
decay_factor: 1.00004,
min_lr: .000001
},
},
extensions: [
!obj:pylearn2.train_extensions.best_params.MonitorBasedSaveBest {
channel_name: 'valid_y_misclass',
save_path: "${PYLEARN2_TRAIN_DIR}maxout.pkl"
},
!obj:pylearn2.training_algorithms.learning_rule.MomentumAdjustor {
start: 1,
saturate: 50,
final_momentum: .99
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment