def test_logsoftmax_grad_3():
    npr.seed(5)

    for ii in xrange(NUM_TRIALS):

        np_X = npr.randn(5,6)
        np_T = npr.randint(0, 10, np_X.shape)
        X    = kayak.Parameter(np_X)
        T    = kayak.Targets(np_T)
        Y    = kayak.LogSoftMax(X)
        Z    = kayak.MatSum(kayak.LogMultinomialLoss(Y, T))

        assert kayak.util.checkgrad(X, Z) < MAX_GRAD_DIFF
dataset/ETHPy150Open HIPS/Kayak/tests/test_LogSoftMax.py/test_logsoftmax_grad_3/original