(self)
Reset the state of the inner optimizer.
Reset the state of the inner optimizer.
Reset the state of the inner optimizer .
def clear(self):
        "Reset the state of the inner optimizer."
        sd = self.state_dict()
        sd['state'] = {}
        self.load_state_dict(sd)
def clear ( self ) : sd = self . state_dict ( ) sd [ 'state' ] = { } self . load_state_dict ( sd )