Skip to content

Instantly share code, notes, and snippets.

@EderSantana
Created March 12, 2014 22:58
Show Gist options
  • Save EderSantana/9518317 to your computer and use it in GitHub Desktop.
Save EderSantana/9518317 to your computer and use it in GitHub Desktop.
Test tied biases for ConvRectifiedLinear
!obj:pylearn2.train.Train {
dataset: &train !obj:pylearn2.datasets.mnist.MNIST {
which_set: 'train',
one_hot: 1,
start: 0,
stop: 50000
},
model: !obj:pylearn2.models.mlp.MLP {
batch_size: 128,
layers: [
!obj:pylearn2.models.mlp.ConvRectifiedLinear {
layer_name: 'h0',
output_channels: 64,
kernel_shape: [8, 8],
pool_shape: [4, 4],
tied_b: True,
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 {
which_set: 'train',
one_hot: 1,
start: 50000,
stop: 60000
},
'test' : !obj:pylearn2.datasets.mnist.MNIST {
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}relu.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