logistic softmax 梯度推导 python