Skip to content

Commit

Permalink
add learning_rate args for auto-encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangkaixu committed May 17, 2013
1 parent 000a9ed commit 30f95de
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions deeplearning/autoencoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def make_array(n,vec):
v[(ind)]=1
return numpy.array(v)

def test_dA(learning_rate=0.1, training_epochs=15,
def test_dA(learning_rate=0.01, training_epochs=15,
dataset="",modelfile="",
batch_size=20, output_folder='dA_plots',
n_visible=1346,n_hidden=100,
Expand Down Expand Up @@ -251,7 +251,7 @@ def output_weights(modelfile,indexfile):
parser.add_argument('--noise', type=float,default=0.1)
parser.add_argument('--beta', type=float,default=0.0)
parser.add_argument('--rho', type=float,default=0.1)

parser.add_argument('--learning_rate', type=float,default=0.01)
parser.add_argument('--predict', action="store_true")
parser.add_argument('--threshold', type=float,default=0.5)

Expand All @@ -261,7 +261,10 @@ def output_weights(modelfile,indexfile):
if args.train :
test_dA(dataset=args.train,n_hidden=args.hidden,
batch_size=args.batch_size,modelfile=args.model,
beta=args.beta,rho=args.rho,noise=args.noise)
beta=args.beta,rho=args.rho,noise=args.noise,
training_epochs=args.iteration,
learning_rate=args.learning_rate,
)
if args.predict :
predict(modelfile=args.model,threshold=args.threshold)
if args.index :
Expand Down

0 comments on commit 30f95de

Please sign in to comment.