code: def getWinner(self, type = 'activation'):
          
          maxvalue = -10000
          maxpos = -1
          ttlvalue = 0
          if type == 'activation':
              ttlvalue = Numeric.add.reduce(self.activation)
              maxpos = Numeric.argmax(self.activation)
              maxvalue = self.activation[maxpos]
          elif type == 'target':
              # note that backprop() resets self.targetSet flag
              if self.verify and self.targetSet == 0:
                  raise LayerError('getWinner() called with \'target\' but target has not been set.', \
                         self.targetSet)
              ttlvalue = Numeric.add.reduce(self.target)
              maxpos = Numeric.argmax(self.target)
              maxvalue = self.target[maxpos]
          else:
              raise LayerError('getWinner() called with unknown layer attribute.', \
                                 type)
          if self.size > 0:
              avgvalue = ttlvalue / float(self.size)
          else:
              raise LayerError('getWinner() called for layer of size zero.', \
                                 self.size)
          return maxpos, maxvalue, avgvalue
docs: Returns the winner of the type specified {'activation' or
          'target'}.