'Get layer parameters. All parameters are needed for optimization, but
only weights are serialized.
Arguments:
get_weights (bool, optional): Control whether all parameters are returned or
just weights for serialization.
keep_states (bool, optional): Control whether all parameters are returned
or just weights for serialization.'

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

    serial_dict = super(ParameterLayer, self).get_description()
    if get_weights:
        serial_dict['params'] = {'W': self.W.get()}
        if keep_states:
            serial_dict['states'] = [s.get() for s in self.states]
    return serial_dict
