def forward(self, inputs):
        '''
            Whiten observation (inputs) to have zero-mean, unit variance.
            Also clamps output to be within 5 standard deviations
            Args:
                inputs -- batched observation input. batch size at dim 0
            Returns:
                0 mean std 1 weightened batch of observation
        '''
        if inputs is None: return None

        input_shape = inputs.size()
        assert len(input_shape) >= 2
        inputs = inputs.view(-1, input_shape[-1])

        running_mean = (self.running_sum / self.count)
        running_std = torch.clamp((self.running_sumsq / self.count \
                                  - running_mean.pow(2)).pow(0.5), min=self.eps)
        normed = torch.clamp((inputs - running_mean) / running_std, -5.0, 5.0)
        normed = normed.view(input_shape)
        return normed

            Whiten observation (inputs) to have zero-mean, unit variance.
            Also clamps output to be within 5 standard deviations
            Args:
                inputs -- batched observation input. batch size at dim 0
            Returns:
                0 mean std 1 weightened batch of observation
        
surreal/model/z_filter.py