Skip to content

Commit

Permalink
still trying to get training correct
Browse files Browse the repository at this point in the history
  • Loading branch information
hlin117 committed Jan 1, 2015
1 parent 18c98fb commit 12b72bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demo/lemondetection/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def main():

num_features = len(data[0]) - 1 # Subtract one because of target values
nn = NeuralNet(num_features, max_epochs=20, learn_rate=.7, scale=0.1,
hidden_layer=[4], verbose=True, activation="tanh")
hidden_layer=[4], verbose=True, activation=("expit", 2))
nn.train(features, targets)

print "Done with training. Took {0} seconds to train." \
Expand Down
2 changes: 1 addition & 1 deletion model/neuralnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import math
import numpy as np

one_line = lambda string: string.replace("\n", "").replace("\t", "")
one_line = lambda string: string.replace("\n", "").replace(" ", "")

class NeuralNet(object):
"""An implementation of a feed forward neural network."""
Expand Down

0 comments on commit 12b72bc

Please sign in to comment.