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