Skip to content

Commit

Permalink
add input to other scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
memimo committed Jul 2, 2015
1 parent 373dfbf commit efa74a1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/convolutional_mlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ def __init__(self, rng, input, filter_shape, image_shape, poolsize=(2, 2)):
# store parameters of this layer
self.params = [self.W, self.b]

# keep track of model input
self.input = input


def evaluate_lenet5(learning_rate=0.1, n_epochs=200,
dataset='mnist.pkl.gz',
Expand Down
3 changes: 3 additions & 0 deletions code/logistic_cg.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ def __init__(self, input, n_in, n_out):
# symbolic form
self.y_pred = T.argmax(self.p_y_given_x, axis=1)

# keep track of model input
self.input = input

def negative_log_likelihood(self, y):
"""Return the negative log-likelihood of the prediction of this model
under a given target distribution.
Expand Down
3 changes: 3 additions & 0 deletions code/mlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ def __init__(self, rng, input, n_in, n_hidden, n_out):
self.params = self.hiddenLayer.params + self.logRegressionLayer.params
# end-snippet-3

# keep track of model input
self.input = input


def test_mlp(learning_rate=0.01, L1_reg=0.00, L2_reg=0.0001, n_epochs=1000,
dataset='mnist.pkl.gz', batch_size=20, n_hidden=500):
Expand Down

0 comments on commit efa74a1

Please sign in to comment.