A hook for a model to react when during training episode is finished

def reset_training_state(self, dones, batch_info):
        """ A hook for a model to react when during training episode is finished """
        for idx, done in enumerate(dones):
            if done > 0.5:
                self.processes[idx].reset()