def done_training(self):
    'Stop condition for training'
    return ((self.phase_idx + 1) >= len(self.phases))
Stop condition for training
def done_training(self):
    
    return ((self.phase_idx + 1) >= len(self.phases))