# HG changeset patch # User Xavier Glorot # Date 1250119164 14400 # Node ID 3a4bc4a0dbf4ff9bdf1ade2c4a0d8a4be6eea566 # Parent a66bef83e1fd7026ee008bbb9107c69228f77776 Changes in global updates to add local updates (avoid to lose information in the representation) DAA inputs groups diff -r a66bef83e1fd -r 3a4bc4a0dbf4 pylearn/algorithms/sandbox/DAA_inputs_groups.py --- a/pylearn/algorithms/sandbox/DAA_inputs_groups.py Wed Aug 12 18:29:18 2009 -0400 +++ b/pylearn/algorithms/sandbox/DAA_inputs_groups.py Wed Aug 12 19:19:24 2009 -0400 @@ -863,9 +863,9 @@ else: if typeup == 'total': if layer == 'all': - cost[-1] = inst.totalupdate[-1](*data) + cost[-1] = inst.totalupdate[-1](*data[-1]) else: - cost[layer] = inst.totalupdate[layer](*data) + cost[layer] = inst.totalupdate[layer](*data[layer]) else: if layer is 'all': for i in range(self.depth): @@ -873,11 +873,15 @@ cost[i] = inst.localupdate[i](*data[i]) if typeup == 'global': cost[i] = inst.globalupdate[i](*data[i]) + for j in range(i): + dummy = inst.localupdate[j](*data[j]) else: if typeup == 'local': - cost[layer] = inst.localupdate[layer](*data) + cost[layer] = inst.localupdate[layer](*data[layer]) if typeup == 'global': - cost[layer] = inst.globalupdate[layer](*data) + cost[layer] = inst.globalupdate[layer](*data[layer]) + for j in range(layer): + dummy = inst.localupdate[j](*data[j]) if printcost: print cost return cost