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