class RegularizationMethod: """RegularizationMethod implement regularization strategies. RegularizationMethod is a callable. The method `update` is called to update the loss, typically at the end of an experience. """ def pre_adapt(self, agent, exp): pass # implementation may be empty if adapt is not needed def post_adapt(self, agent, exp): pass # implementation may be empty if adapt is not needed def __call__(self, *args, **kwargs): raise NotImplementedError()