1
0
Fork 0
mirror of https://github.com/tensorflow/haskell.git synced 2025-02-17 05:25:05 +01:00

removed ref constraint; added identity op

This commit is contained in:
silky 2016-12-22 15:08:48 +11:00
parent 0336df5488
commit 29499776ad
2 changed files with 4 additions and 4 deletions

View file

@ -167,9 +167,9 @@ placeholder shape' =
-- | Construct a tensor whose value is the initialized value of the given
-- tensor.
initializedValue :: forall a. TensorType a
=> Tensor Ref a
-> Build (Tensor Ref a)
initializedValue :: forall a v. TensorType a
=> Tensor v a
-> Build (Tensor v a)
initializedValue t = do
ns <- use initializationNodes
-- Make this tensor depend on the initializers of the other.

View file

@ -113,7 +113,7 @@ testInitializedVariableShape =
testCase "testInitializedVariableShape" $ runSession $ do
vector <- build $ do
a <- initializedVariable (constant [1] [42 :: Float])
b <- initializedValue a
b <- initializedValue (identity a)
return b
result <- run vector
liftIO $ [42] @=? (result :: V.Vector Float)