comparison deep/stacked_dae/v_sylvain/sgd_optimization.py @ 457:78ed4628071d

Rajout de la ligne qui compte le nombre de mini-batch (enleve precedemment)
author SylvainPL <sylvain.pannetier.lebeuf@umontreal.ca>
date Wed, 26 May 2010 20:25:39 -0400
parents 09e1c5872c2b
children
comparison
equal deleted inserted replaced
456:66b05c6077c7 457:78ed4628071d
414 name = 'test' 414 name = 'test'
415 train_losses2 = [test_model(x,y) for x,y in iter2] 415 train_losses2 = [test_model(x,y) for x,y in iter2]
416 train_score2 = numpy.mean(train_losses2) 416 train_score2 = numpy.mean(train_losses2)
417 print 'On the ' + name + 'dataset' 417 print 'On the ' + name + 'dataset'
418 print(('\t the error is %f')%(train_score2*100.)) 418 print(('\t the error is %f')%(train_score2*100.))
419 #print len(train_losses2)
419 stderr = math.sqrt(train_score2-train_score2**2)/math.sqrt(len(train_losses2)*self.hp.minibatch_size) 420 stderr = math.sqrt(train_score2-train_score2**2)/math.sqrt(len(train_losses2)*self.hp.minibatch_size)
420 print (('\t the stderr is %f')%(stderr*100.)) 421 print (('\t the stderr is %f')%(stderr*100.))
421 422
422 #To see the prediction of the model, the real answer and the image to judge 423 #To see the prediction of the model, the real answer and the image to judge
423 def see_error(self, dataset): 424 def see_error(self, dataset):