def learn_batch(self, inputBatch):
        """Encodes a whole batch of input arrays, and performs weight updates and updates to the activity 
        statistics according to the respective methods implemented below."""
        X = inputBatch
        Y = self.encode_batch(X)
        self.update_statistics(Y) 
        self.update_weights(X,Y)
        return Y