changeset 814:90b50bd79bc0

independant Tie weigths auxiliary bug fix DAA inputs groups
author Xavier Glorot <glorotxa@iro.umontreal.ca>
date Fri, 14 Aug 2009 19:19:30 -0400
parents 928f12f9c6fe
children 4a52878d1ddc
files pylearn/algorithms/sandbox/DAA_inputs_groups.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/algorithms/sandbox/DAA_inputs_groups.py	Thu Aug 13 12:11:51 2009 -0400
+++ b/pylearn/algorithms/sandbox/DAA_inputs_groups.py	Fri Aug 14 19:19:30 2009 -0400
@@ -219,7 +219,7 @@
         
         if self.auxinput is not None:
             self.wauxenc = [T.dmatrix('wauxenc%s'%i) for i in range(len(auxin_size))]
-            self.wauxdec =[ self.wauxenc[i].T if tie_weights_aux else T.dmatrix('wauxdec%s'%i) for i in\
+            self.wauxdec =[ self.wauxenc[i].T if self.tie_weights_aux else T.dmatrix('wauxdec%s'%i) for i in\
                     range(len(auxin_size))]
             self.bauxdec = [T.dvector('bauxdec%s'%i) for i in range(len(auxin_size))]
         
@@ -823,7 +823,7 @@
         return numpy.mean(numpy.median(abs(inst.recactivation[layer](*inputs)),1))
     
     def _instance_error(self,inst,inputs,target):
-        return numpy.sum(inst.classify(*inputs) != target) / float(len(target)) *100.0
+        return numpy.sum(inst.classify(*inputs) != target) / float(len(target))*100.0
     
     def _instance_nll(self,inst,inputs,target):
         return numpy.sum(inst.NLL(*(inputs+[target]))) / float(len(target))
@@ -842,7 +842,7 @@
         if sat[-1]>max(sat[:-1]):
             inst.daaig[-1].w = inst.daaig[-1].w/sat[-1]*max(sat[:-1])
             inst.daaig[-1].b = inst.daaig[-1].b/sat[-1]*max(sat[:-1])
-
+    
     #-----------------------------------------------------------------------
     
     def _instance_unsupgrad(self,inst,inputs,layer,param_name):