Skip to content

Commit

Permalink
Add minibatch_size hyperparameter
Browse files Browse the repository at this point in the history
  • Loading branch information
timodonnell committed Nov 28, 2017
1 parent 38adfb4 commit 33b1b5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 2 additions & 1 deletion downloads-generation/models_class1/hyperparameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
# OPTIMIZATION
##########################################
"max_epochs": 500,
"patience": 10,
"patience": 20,
"early_stopping": true,
"validation_split": 0.2,
"minibatch_size": 128,

##########################################
# RANDOM NEGATIVE PEPTIDES
Expand Down
7 changes: 2 additions & 5 deletions mhcflurry/class1_affinity_prediction/class1_neural_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ class Class1NeuralNetwork(object):
batch_normalization=False,
embedding_init_method="glorot_uniform",
locally_connected_layers=[
{
"filters": 8,
"activation": "tanh",
"kernel_size": 3
},
{
"filters": 8,
"activation": "tanh",
Expand All @@ -77,6 +72,7 @@ class Class1NeuralNetwork(object):
take_best_epoch=False, # currently unused
validation_split=0.2,
early_stopping=True,
minibatch_size=128,
random_negative_rate=0.0,
random_negative_constant=25,
random_negative_affinity_min=20000.0,
Expand Down Expand Up @@ -447,6 +443,7 @@ def fit(
x_dict_with_random_negatives,
y_dict_with_random_negatives,
shuffle=True,
batch_size=self.hyperparameters['minibatch_size'],
verbose=verbose,
epochs=1,
validation_split=self.hyperparameters['validation_split'],
Expand Down

0 comments on commit 33b1b5d

Please sign in to comment.