'Get layer parameters.
Arguments:
get_weights (bool, optional): Control whether all parameters are returned or
just weights for serialization.
keep_states (bool, optional): Controls whether the states should be returned'

def get_description(self, get_weights=False, keep_states=True):

    serial_dict = super(BatchNorm, self).get_description()
    if get_weights:
        serial_dict['params'] = {}
        for key in ['beta', 'gamma', 'gmean', 'gvar']:
            serial_dict['params'][key] = getattr(self, key).get()
        if keep_states:
            serial_dict['states'] = [[s.get() for s in slist] for slist in self.states]
    return serial_dict
