def smooth_scores(self, curr_scores):
    ' Smooth the current prediction score\n            by taking the average with previous scores\n        '
    self.scores_hist.append(curr_scores)
    DEQUE_MAX_SIZE = 2
    if (len(self.scores_hist) > DEQUE_MAX_SIZE):
        self.scores_hist.popleft()
    if 1:
        score_sums = np.zeros((len(self.action_labels),))
        for score in self.scores_hist:
            score_sums += score
        score_sums /= len(self.scores_hist)
        print('\nMean score:\n', score_sums)
        return score_sums
    else:
        score_mul = np.ones((len(self.action_labels),))
        for score in self.scores_hist:
            score_mul *= score
        return score_mul
Smooth the current prediction score
by taking the average with previous scores
def smooth_scores(self, curr_scores):
    ' Smooth the current prediction score\n            by taking the average with previous scores\n        '
    self.scores_hist.append(curr_scores)
    DEQUE_MAX_SIZE = 2
    if (len(self.scores_hist) > DEQUE_MAX_SIZE):
        self.scores_hist.popleft()
    if 1:
        score_sums = np.zeros((len(self.action_labels),))
        for score in self.scores_hist:
            score_sums += score
        score_sums /= len(self.scores_hist)
        print('\nMean score:\n', score_sums)
        return score_sums
    else:
        score_mul = np.ones((len(self.action_labels),))
        for score in self.scores_hist:
            score_mul *= score
        return score_mul