Creates a queue that dequeues elements in a first-in first-out order. A `FIFOQueue` has bounded capacity; supports multiple concurrent producers and consumers; and provides exactly-once delivery. A `FIFOQueue` holds a list of up to `capacity` elements. Each element is a fixed-lengt
(self,
capacity,
dtypes,
shapes=None,
names=None,
shared_name=None,
name="fifo_queue")
| 717 | """ |
| 718 | |
| 719 | def __init__(self, |
| 720 | capacity, |
| 721 | dtypes, |
| 722 | shapes=None, |
| 723 | names=None, |
| 724 | shared_name=None, |
| 725 | name="fifo_queue"): |
| 726 | """Creates a queue that dequeues elements in a first-in first-out order. |
| 727 | |
| 728 | A `FIFOQueue` has bounded capacity; supports multiple concurrent |
| 729 | producers and consumers; and provides exactly-once delivery. |
| 730 | |
| 731 | A `FIFOQueue` holds a list of up to `capacity` elements. Each |
| 732 | element is a fixed-length tuple of tensors whose dtypes are |
| 733 | described by `dtypes`, and whose shapes are optionally described |
| 734 | by the `shapes` argument. |
| 735 | |
| 736 | If the `shapes` argument is specified, each component of a queue |
| 737 | element must have the respective fixed shape. If it is |
| 738 | unspecified, different queue elements may have different shapes, |
| 739 | but the use of `dequeue_many` is disallowed. |
| 740 | |
| 741 | Args: |
| 742 | capacity: An integer. The upper bound on the number of elements |
| 743 | that may be stored in this queue. |
| 744 | dtypes: A list of `DType` objects. The length of `dtypes` must equal |
| 745 | the number of tensors in each queue element. |
| 746 | shapes: (Optional.) A list of fully-defined `TensorShape` objects |
| 747 | with the same length as `dtypes`, or `None`. |
| 748 | names: (Optional.) A list of string naming the components in the queue |
| 749 | with the same length as `dtypes`, or `None`. If specified the dequeue |
| 750 | methods return a dictionary with the names as keys. |
| 751 | shared_name: (Optional.) If non-empty, this queue will be shared under |
| 752 | the given name across multiple sessions. |
| 753 | name: Optional name for the queue operation. |
| 754 | """ |
| 755 | dtypes = _as_type_list(dtypes) |
| 756 | shapes = _as_shape_list(shapes, dtypes) |
| 757 | names = _as_name_list(names, dtypes) |
| 758 | queue_ref = gen_data_flow_ops.fifo_queue_v2( |
| 759 | component_types=dtypes, |
| 760 | shapes=shapes, |
| 761 | capacity=capacity, |
| 762 | shared_name=_shared_name(shared_name), |
| 763 | name=name) |
| 764 | |
| 765 | super(FIFOQueue, self).__init__(dtypes, shapes, names, queue_ref) |
| 766 | |
| 767 | |
| 768 | @tf_export( |
nothing calls this directly
no test coverage detected