def terminate(self):
    if self.args.test_only:
        self.test()
        return True
    else:
        epoch = (self.optimizer.get_last_epoch() + 1)
        return (epoch > self.args.epochs)
def terminate(self):
    if self.args.test_only:
        self.test()
        return True
    else:
        epoch = (self.optimizer.get_last_epoch() + 1)
        return (epoch > self.args.epochs)