Safe Haskell | None |
---|---|

Language | Haskell2010 |

Queues in TensorFlow graph. Very limited support for now.

## Synopsis

- data Queue (as :: [*])
- makeQueue :: forall as m. (MonadBuild m, TensorTypes as) => Int64 -> ByteString -> m (Queue as)
- enqueue :: forall as v m. (MonadBuild m, TensorTypes as) => Queue as -> TensorList v as -> m ControlNode
- dequeue :: forall as m. (MonadBuild m, TensorTypes as) => Queue as -> m (TensorList Value as)

# Documentation

:: forall as m. (MonadBuild m, TensorTypes as) | |

=> 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. |

-> m (Queue as) |

Creates a new queue with the given capacity and shared name.

enqueue :: forall as v m. (MonadBuild m, TensorTypes as) => Queue as -> TensorList v as -> m ControlNode Source #

Adds the given values to the queue.

:: forall as m. (MonadBuild m, TensorTypes as) | |

=> Queue as | |

-> m (TensorList Value as) | Dequeued tensors. They are coupled in a sense that values appear together, even if they are not consumed together. |

Retrieves the values from the queue.