testExpandDims :: Test
testExpandDims =
  testCase "testExpandDims" $ do
    ([dx], [s]) <-
      TF.runSession $ do
        (x :: TF.Tensor TF.Value Float) <- TF.render $ TF.zeros $ TF.Shape [1, 2, 3 :: Int64]
        let y = TF.expandDims x $ TF.constant (TF.Shape [1]) [0 :: Int32]
        calculateGradWithShape y x
    V.fromList [1, 1, 1, 1, 1, 1] @=? dx
    V.fromList [1, 2, 3] @=? s
testExpandDims :: Test
testExpandDims =
  testCase "testExpandDims" $ do
    ([dx], [s]) <-
      TF.runSession $ do
        (x :: TF.Tensor TF.Value Float) <- TF.render $ TF.zeros $ TF.Shape [1, 2, 3 :: Int64]
        let y = TF.expandDims x $ TF.constant (TF.Shape [1]) [0 :: Int32]
        calculateGradWithShape y x
    V.fromList [1, 1, 1, 1, 1, 1] @=? dx
    V.fromList [1, 2, 3] @=? s
testExpandDims =
  testCase "testExpandDims" $ do
    ([dx], [s]) <-
      TF.runSession $ do
        (x :: TF.Tensor TF.Value Float) <- TF.render $ TF.zeros $ TF.Shape [1, 2, 3 :: Int64]
        let y = TF.expandDims x $ TF.constant (TF.Shape [1]) [0 :: Int32]
        calculateGradWithShape y x
    V.fromList [1, 1, 1, 1, 1, 1] @=? dx
    V.fromList [1, 2, 3] @=? s