MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / RandomShuffleQueue

Method RandomShuffleQueue

tensorflow/core/kernels/random_shuffle_queue_op.cc:89–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87};
88
89RandomShuffleQueue::RandomShuffleQueue(
90 int32 capacity, int32 min_after_dequeue, int64 seed, int64 seed2,
91 const DataTypeVector& component_dtypes,
92 const std::vector<TensorShape>& component_shapes, const string& name)
93 : TypedQueue(capacity, component_dtypes, component_shapes, name),
94 min_after_dequeue_(min_after_dequeue),
95 original_seed_(seed),
96 original_seed2_(seed2),
97 generator_(&parent_generator_) {
98 if (seed == 0 && seed2 == 0) {
99 // If both seeds are unspecified, use completely random seeds.
100 seed = random::New64();
101 seed2 = random::New64();
102 }
103 parent_generator_ = random::PhiloxRandom(seed, seed2);
104}
105
106Status RandomShuffleQueue::Initialize() {
107 TF_RETURN_IF_ERROR(TypedQueue::Initialize());

Callers 15

parallel_readFunction · 0.80
testEnqueueMethod · 0.80
testEnqueueWithShapeMethod · 0.80
testScalarShapesMethod · 0.80
testParallelEnqueueMethod · 0.80
testParallelDequeueMethod · 0.80
testDequeueMethod · 0.80

Calls 2

New64Function · 0.85
PhiloxRandomClass · 0.85

Tested by 15

testEnqueueMethod · 0.64
testEnqueueWithShapeMethod · 0.64
testScalarShapesMethod · 0.64
testParallelEnqueueMethod · 0.64
testParallelDequeueMethod · 0.64
testDequeueMethod · 0.64
testQueueSizeEmptyMethod · 0.64