comparison baseline/log_reg/log_reg.py @ 271:a92ec9939e4f

fixed a problem with maxsize when not provided
author Yoshua Bengio <bengioy@iro.umontreal.ca>
date Sun, 21 Mar 2010 19:30:05 -0400
parents c24020aa38ac
children 5541056d3fb0
comparison
equal deleted inserted replaced
270:d41fe003fade 271:a92ec9939e4f
140 #-------------------------------------------------------------------------------------------------------------------- 140 #--------------------------------------------------------------------------------------------------------------------
141 # MAIN 141 # MAIN
142 #-------------------------------------------------------------------------------------------------------------------- 142 #--------------------------------------------------------------------------------------------------------------------
143 143
144 def log_reg( learning_rate = 0.13, nb_max_examples =1000000, batch_size = 50, \ 144 def log_reg( learning_rate = 0.13, nb_max_examples =1000000, batch_size = 50, \
145 dataset=datasets.nist_digits, image_size = 32 * 32, nb_class = 10, \ 145 dataset=datasets.nist_digits(), image_size = 32 * 32, nb_class = 10, \
146 patience = 5000, patience_increase = 2, improvement_threshold = 0.995): 146 patience = 5000, patience_increase = 2, improvement_threshold = 0.995):
147 147
148 #28 * 28 = 784 148 #28 * 28 = 784
149 """ 149 """
150 Demonstrate stochastic gradient descent optimization of a log-linear 150 Demonstrate stochastic gradient descent optimization of a log-linear