def softmax_gradient(x):
        """
        Calculates the gradient of the softmax

        :param x: a number
        :return: the gradient of the softmax
        """
        x = np.asarray(x)
        x_reshaped = x.reshape(-1, 1)
        return np.diagflat(x_reshaped) - np.dot(x_reshaped, x_reshaped.T)

        Calculates the gradient of the softmax

        :param x: a number
        :return: the gradient of the softmax
        
plato/agent/component/dialogue_policy/deep_learning/reinforce_policy.py