testMeanGradGrad :: Test
testMeanGradGrad = testCase "testMeanGradGrad" $ do
    [ddx] <- TF.runSession $ do
        x <- TF.render $ TF.vector [1, 2, 0 :: Float]
        let y = TF.mean x (TF.vector [0 :: Int32])
        [dx] <- TF.gradients y [x]
        TF.gradients dx [x] >>= TF.run

    V.fromList [0, 0, 0 :: Float] @=? ddx
testMeanGradGrad :: Test
testMeanGradGrad = testCase "testMeanGradGrad" $ do
    [ddx] <- TF.runSession $ do
        x <- TF.render $ TF.vector [1, 2, 0 :: Float]
        let y = TF.mean x (TF.vector [0 :: Int32])
        [dx] <- TF.gradients y [x]
        TF.gradients dx [x] >>= TF.run

    V.fromList [0, 0, 0 :: Float] @=? ddx
testMeanGradGrad = testCase "testMeanGradGrad" $ do
    [ddx] <- TF.runSession $ do
        x <- TF.render $ TF.vector [1, 2, 0 :: Float]
        let y = TF.mean x (TF.vector [0 :: Int32])
        [dx] <- TF.gradients y [x]
        TF.gradients dx [x] >>= TF.run

    V.fromList [0, 0, 0 :: Float] @=? ddx