51
51
import org .tensorflow .types .TInt32 ;
52
52
import org .tensorflow .types .TInt64 ;
53
53
import org .tensorflow .types .TString ;
54
- import org .tensorflow .util .ndarray . Shape ;
54
+ import org .tensorflow .util .Shape ;
55
55
56
56
/**
57
57
* An API for building {@code io} operations as {@link Op Op}s
@@ -65,6 +65,20 @@ public final class IoOps {
65
65
this .scope = scope ;
66
66
}
67
67
68
+ /**
69
+ * Builds an {@link PriorityQueue} operation
70
+ *
71
+ * @param componentTypes The type of each component in a value.
72
+ * @param shapes The shape of each component in a value. The length of this attr must
73
+ * @param options carries optional attributes values
74
+ * @return a new instance of PriorityQueue
75
+ * @see org.tensorflow.op.io.PriorityQueue
76
+ */
77
+ public PriorityQueue priorityQueue (List <DataType <?>> componentTypes , List <Shape > shapes ,
78
+ PriorityQueue .Options ... options ) {
79
+ return PriorityQueue .create (scope , componentTypes , shapes , options );
80
+ }
81
+
68
82
/**
69
83
* Builds an {@link QueueEnqueueMany} operation
70
84
*
@@ -155,25 +169,6 @@ public <T> DecodeRaw<T> decodeRaw(Operand<TString> bytes, DataType<T> outType,
155
169
return DecodeRaw .create (scope , bytes , outType , options );
156
170
}
157
171
158
- /**
159
- * Builds an {@link ParseExample} operation
160
- *
161
- * @param serialized A vector containing a batch of binary serialized Example protos.
162
- * @param names A vector containing the names of the serialized protos.
163
- * @param sparseKeys A list of Nsparse string Tensors (scalars).
164
- * @param denseKeys A list of Ndense string Tensors (scalars).
165
- * @param denseDefaults A list of Ndense Tensors (some may be empty).
166
- * @param sparseTypes A list of Nsparse types; the data types of data in each Feature
167
- * @param denseShapes A list of Ndense shapes; the shapes of data in each Feature
168
- * @return a new instance of ParseExample
169
- * @see org.tensorflow.op.io.ParseExample
170
- */
171
- public ParseExample parseExample (Operand <TString > serialized , Operand <TString > names ,
172
- Iterable <Operand <TString >> sparseKeys , Iterable <Operand <TString >> denseKeys ,
173
- Iterable <Operand <?>> denseDefaults , List <DataType <?>> sparseTypes , List <Shape > denseShapes ) {
174
- return ParseExample .create (scope , serialized , names , sparseKeys , denseKeys , denseDefaults , sparseTypes , denseShapes );
175
- }
176
-
177
172
/**
178
173
* Builds an {@link DecodeBase64} operation
179
174
*
@@ -207,6 +202,25 @@ public WholeFileReader wholeFileReader(WholeFileReader.Options... options) {
207
202
return WholeFileReader .create (scope , options );
208
203
}
209
204
205
+ /**
206
+ * Builds an {@link ParseSingleExample} operation
207
+ *
208
+ * @param serialized A vector containing a batch of binary serialized Example protos.
209
+ * @param denseDefaults A list of Tensors (some may be empty), whose length matches
210
+ * @param numSparse The number of sparse features to be parsed from the example. This
211
+ * @param sparseKeys A list of `num_sparse` strings.
212
+ * @param denseKeys The keys expected in the Examples' features associated with dense
213
+ * @param sparseTypes A list of `num_sparse` types; the data types of data in each
214
+ * @param denseShapes The shapes of data in each Feature given in dense_keys.
215
+ * @return a new instance of ParseSingleExample
216
+ * @see org.tensorflow.op.io.ParseSingleExample
217
+ */
218
+ public ParseSingleExample parseSingleExample (Operand <TString > serialized ,
219
+ Iterable <Operand <?>> denseDefaults , Long numSparse , List <String > sparseKeys ,
220
+ List <String > denseKeys , List <DataType <?>> sparseTypes , List <Shape > denseShapes ) {
221
+ return ParseSingleExample .create (scope , serialized , denseDefaults , numSparse , sparseKeys , denseKeys , sparseTypes , denseShapes );
222
+ }
223
+
210
224
/**
211
225
* Builds an {@link SerializeManySparse} operation
212
226
*
@@ -409,25 +423,6 @@ public EncodeBase64 encodeBase64(Operand<TString> input, EncodeBase64.Options...
409
423
return EncodeBase64 .create (scope , input , options );
410
424
}
411
425
412
- /**
413
- * Builds an {@link ParseSingleExample} operation
414
- *
415
- * @param serialized A vector containing a batch of binary serialized Example protos.
416
- * @param denseDefaults A list of Tensors (some may be empty), whose length matches
417
- * @param numSparse The number of sparse features to be parsed from the example. This
418
- * @param sparseKeys A list of `num_sparse` strings.
419
- * @param denseKeys The keys expected in the Examples' features associated with dense
420
- * @param sparseTypes A list of `num_sparse` types; the data types of data in each
421
- * @param denseShapes The shapes of data in each Feature given in dense_keys.
422
- * @return a new instance of ParseSingleExample
423
- * @see org.tensorflow.op.io.ParseSingleExample
424
- */
425
- public ParseSingleExample parseSingleExample (Operand <TString > serialized ,
426
- Iterable <Operand <?>> denseDefaults , Long numSparse , List <String > sparseKeys ,
427
- List <String > denseKeys , List <DataType <?>> sparseTypes , List <Shape > denseShapes ) {
428
- return ParseSingleExample .create (scope , serialized , denseDefaults , numSparse , sparseKeys , denseKeys , sparseTypes , denseShapes );
429
- }
430
-
431
426
/**
432
427
* Builds an {@link SerializeSparse} operation
433
428
*
@@ -494,6 +489,25 @@ public ReaderNumWorkUnitsCompleted readerNumWorkUnitsCompleted(Operand<?> reader
494
489
return ReaderNumWorkUnitsCompleted .create (scope , readerHandle );
495
490
}
496
491
492
+ /**
493
+ * Builds an {@link ParseExample} operation
494
+ *
495
+ * @param serialized A vector containing a batch of binary serialized Example protos.
496
+ * @param names A vector containing the names of the serialized protos.
497
+ * @param sparseKeys A list of Nsparse string Tensors (scalars).
498
+ * @param denseKeys A list of Ndense string Tensors (scalars).
499
+ * @param denseDefaults A list of Ndense Tensors (some may be empty).
500
+ * @param sparseTypes A list of Nsparse types; the data types of data in each Feature
501
+ * @param denseShapes A list of Ndense shapes; the shapes of data in each Feature
502
+ * @return a new instance of ParseExample
503
+ * @see org.tensorflow.op.io.ParseExample
504
+ */
505
+ public ParseExample parseExample (Operand <TString > serialized , Operand <TString > names ,
506
+ Iterable <Operand <TString >> sparseKeys , Iterable <Operand <TString >> denseKeys ,
507
+ Iterable <Operand <?>> denseDefaults , List <DataType <?>> sparseTypes , List <Shape > denseShapes ) {
508
+ return ParseExample .create (scope , serialized , names , sparseKeys , denseKeys , denseDefaults , sparseTypes , denseShapes );
509
+ }
510
+
497
511
/**
498
512
* Builds an {@link ReaderRead} operation
499
513
*
@@ -545,20 +559,6 @@ public <T> SerializeTensor serializeTensor(Operand<T> tensor) {
545
559
return SerializeTensor .create (scope , tensor );
546
560
}
547
561
548
- /**
549
- * Builds an {@link PriorityQueue} operation
550
- *
551
- * @param componentTypes The type of each component in a value.
552
- * @param shapes The shape of each component in a value. The length of this attr must
553
- * @param options carries optional attributes values
554
- * @return a new instance of PriorityQueue
555
- * @see org.tensorflow.op.io.PriorityQueue
556
- */
557
- public PriorityQueue priorityQueue (List <DataType <?>> componentTypes , List <Shape > shapes ,
558
- PriorityQueue .Options ... options ) {
559
- return PriorityQueue .create (scope , componentTypes , shapes , options );
560
- }
561
-
562
562
/**
563
563
* Builds an {@link QueueIsClosed} operation
564
564
*
0 commit comments