Safe Haskell | None |
---|---|
Language | Haskell2010 |
Queues in TensorFlow graph. Very limited support for now.
- data Queue2 a b
- makeQueue2 :: forall a b. (TensorType a, TensorType b) => Int64 -> ByteString -> Build (Queue2 a b)
- enqueue :: forall a b v1 v2. (TensorType a, TensorType b) => Queue2 a b -> Tensor v1 a -> Tensor v2 b -> Build ControlNode
- dequeue :: forall a b. (TensorType a, TensorType b) => Queue2 a b -> Build (Tensor Ref a, Tensor Ref b)
Documentation
A queue carrying tuples. The underlying structure is more versatile and can be made to support arbitrary tuples.
:: (TensorType a, TensorType b) | |
=> Int64 | The upper bound on the number of elements in this queue. Negative numbers mean no limit. |
-> ByteString | If non-empty, this queue will be shared under the given name across multiple sessions. |
-> Build (Queue2 a b) |
Creates a new queue with the given capacity and shared name.
enqueue :: forall a b v1 v2. (TensorType a, TensorType b) => Queue2 a b -> Tensor v1 a -> Tensor v2 b -> Build ControlNode Source
Adds the given values to the queue.
:: (TensorType a, TensorType b) | |
=> Queue2 a b | |
-> Build (Tensor Ref a, Tensor Ref b) | Dequeued tensors. They are paired in a sense that values appear together, even if they are not consumed together. |
Retrieves the values from the queue.