18
18
package org .tensorflow .op ;
19
19
20
20
import java .util .List ;
21
- import org .tensorflow .DataType ;
22
21
import org .tensorflow .Operand ;
23
22
import org .tensorflow .ndarray .Shape ;
24
23
import org .tensorflow .op .data .AnonymousIterator ;
49
48
import org .tensorflow .types .TBool ;
50
49
import org .tensorflow .types .TInt64 ;
51
50
import org .tensorflow .types .TString ;
51
+ import org .tensorflow .types .family .TType ;
52
52
53
53
/**
54
54
* An API for building {@code data} operations as {@link Op Op}s
@@ -75,7 +75,7 @@ public final class DataOps {
75
75
* @param outputShapes
76
76
* @return a new instance of AnonymousIterator
77
77
*/
78
- public AnonymousIterator anonymousIterator (List <DataType <? >> outputTypes ,
78
+ public AnonymousIterator anonymousIterator (List <Class <? extends TType >> outputTypes ,
79
79
List <Shape > outputShapes ) {
80
80
return AnonymousIterator .create (scope , outputTypes , outputShapes );
81
81
}
@@ -93,8 +93,8 @@ public AnonymousIterator anonymousIterator(List<DataType<?>> outputTypes,
93
93
* @return a new instance of BatchDataset
94
94
*/
95
95
public BatchDataset batchDataset (Operand <?> inputDataset , Operand <TInt64 > batchSize ,
96
- Operand <TBool > dropRemainder , List <DataType <?>> outputTypes , List < Shape > outputShapes ,
97
- BatchDataset .Options ... options ) {
96
+ Operand <TBool > dropRemainder , List <Class <? extends TType >> outputTypes ,
97
+ List < Shape > outputShapes , BatchDataset .Options ... options ) {
98
98
return BatchDataset .create (scope , inputDataset , batchSize , dropRemainder , outputTypes , outputShapes , options );
99
99
}
100
100
@@ -129,7 +129,7 @@ public CSVDataset cSVDataset(Operand<TString> filenames, Operand<TString> compre
129
129
* @return a new instance of ConcatenateDataset
130
130
*/
131
131
public ConcatenateDataset concatenateDataset (Operand <?> inputDataset , Operand <?> anotherDataset ,
132
- List <DataType <? >> outputTypes , List <Shape > outputShapes ) {
132
+ List <Class <? extends TType >> outputTypes , List <Shape > outputShapes ) {
133
133
return ConcatenateDataset .create (scope , inputDataset , anotherDataset , outputTypes , outputShapes );
134
134
}
135
135
@@ -164,8 +164,8 @@ public DeserializeIterator deserializeIterator(Operand<?> resourceHandle, Operan
164
164
* @param outputShapes
165
165
* @return a new instance of Iterator
166
166
*/
167
- public Iterator iterator (String sharedName , String container , List < DataType <?>> outputTypes ,
168
- List <Shape > outputShapes ) {
167
+ public Iterator iterator (String sharedName , String container ,
168
+ List <Class <? extends TType >> outputTypes , List < Shape > outputShapes ) {
169
169
return Iterator .create (scope , sharedName , container , outputTypes , outputShapes );
170
170
}
171
171
@@ -177,8 +177,8 @@ public Iterator iterator(String sharedName, String container, List<DataType<?>>
177
177
* @param outputShapes
178
178
* @return a new instance of IteratorGetNext
179
179
*/
180
- public IteratorGetNext iteratorGetNext (Operand <?> iterator , List < DataType <?>> outputTypes ,
181
- List <Shape > outputShapes ) {
180
+ public IteratorGetNext iteratorGetNext (Operand <?> iterator ,
181
+ List <Class <? extends TType >> outputTypes , List < Shape > outputShapes ) {
182
182
return IteratorGetNext .create (scope , iterator , outputTypes , outputShapes );
183
183
}
184
184
@@ -191,7 +191,7 @@ public IteratorGetNext iteratorGetNext(Operand<?> iterator, List<DataType<?>> ou
191
191
* @return a new instance of IteratorGetNextAsOptional
192
192
*/
193
193
public IteratorGetNextAsOptional iteratorGetNextAsOptional (Operand <?> iterator ,
194
- List <DataType <? >> outputTypes , List <Shape > outputShapes ) {
194
+ List <Class <? extends TType >> outputTypes , List <Shape > outputShapes ) {
195
195
return IteratorGetNextAsOptional .create (scope , iterator , outputTypes , outputShapes );
196
196
}
197
197
@@ -208,8 +208,8 @@ public IteratorGetNextAsOptional iteratorGetNextAsOptional(Operand<?> iterator,
208
208
* @param outputShapes
209
209
* @return a new instance of IteratorGetNextSync
210
210
*/
211
- public IteratorGetNextSync iteratorGetNextSync (Operand <?> iterator , List < DataType <?>> outputTypes ,
212
- List <Shape > outputShapes ) {
211
+ public IteratorGetNextSync iteratorGetNextSync (Operand <?> iterator ,
212
+ List <Class <? extends TType >> outputTypes , List < Shape > outputShapes ) {
213
213
return IteratorGetNextSync .create (scope , iterator , outputTypes , outputShapes );
214
214
}
215
215
@@ -255,8 +255,8 @@ public OptionalFromValue optionalFromValue(Iterable<Operand<?>> components) {
255
255
* @param outputShapes
256
256
* @return a new instance of OptionalGetValue
257
257
*/
258
- public OptionalGetValue optionalGetValue (Operand <?> optional , List < DataType <?>> outputTypes ,
259
- List <Shape > outputShapes ) {
258
+ public OptionalGetValue optionalGetValue (Operand <?> optional ,
259
+ List <Class <? extends TType >> outputTypes , List < Shape > outputShapes ) {
260
260
return OptionalGetValue .create (scope , optional , outputTypes , outputShapes );
261
261
}
262
262
@@ -290,7 +290,7 @@ public OptionalNone optionalNone() {
290
290
* @return a new instance of RangeDataset
291
291
*/
292
292
public RangeDataset rangeDataset (Operand <TInt64 > start , Operand <TInt64 > stop ,
293
- Operand <TInt64 > step , List <DataType <? >> outputTypes , List <Shape > outputShapes ) {
293
+ Operand <TInt64 > step , List <Class <? extends TType >> outputTypes , List <Shape > outputShapes ) {
294
294
return RangeDataset .create (scope , start , stop , step , outputTypes , outputShapes );
295
295
}
296
296
@@ -305,7 +305,7 @@ public RangeDataset rangeDataset(Operand<TInt64> start, Operand<TInt64> stop,
305
305
* @return a new instance of RepeatDataset
306
306
*/
307
307
public RepeatDataset repeatDataset (Operand <?> inputDataset , Operand <TInt64 > count ,
308
- List <DataType <? >> outputTypes , List <Shape > outputShapes ) {
308
+ List <Class <? extends TType >> outputTypes , List <Shape > outputShapes ) {
309
309
return RepeatDataset .create (scope , inputDataset , count , outputTypes , outputShapes );
310
310
}
311
311
@@ -332,7 +332,7 @@ public SerializeIterator serializeIterator(Operand<?> resourceHandle,
332
332
* @return a new instance of SkipDataset
333
333
*/
334
334
public SkipDataset skipDataset (Operand <?> inputDataset , Operand <TInt64 > count ,
335
- List <DataType <? >> outputTypes , List <Shape > outputShapes ) {
335
+ List <Class <? extends TType >> outputTypes , List <Shape > outputShapes ) {
336
336
return SkipDataset .create (scope , inputDataset , count , outputTypes , outputShapes );
337
337
}
338
338
@@ -348,7 +348,7 @@ public SkipDataset skipDataset(Operand<?> inputDataset, Operand<TInt64> count,
348
348
* @return a new instance of TakeDataset
349
349
*/
350
350
public TakeDataset takeDataset (Operand <?> inputDataset , Operand <TInt64 > count ,
351
- List <DataType <? >> outputTypes , List <Shape > outputShapes ) {
351
+ List <Class <? extends TType >> outputTypes , List <Shape > outputShapes ) {
352
352
return TakeDataset .create (scope , inputDataset , count , outputTypes , outputShapes );
353
353
}
354
354
@@ -409,8 +409,8 @@ public TfRecordDataset tfRecordDataset(Operand<TString> filenames,
409
409
* @param outputShapes
410
410
* @return a new instance of ZipDataset
411
411
*/
412
- public ZipDataset zipDataset (Iterable <Operand <?>> inputDatasets , List < DataType <?>> outputTypes ,
413
- List <Shape > outputShapes ) {
412
+ public ZipDataset zipDataset (Iterable <Operand <?>> inputDatasets ,
413
+ List <Class <? extends TType >> outputTypes , List < Shape > outputShapes ) {
414
414
return ZipDataset .create (scope , inputDatasets , outputTypes , outputShapes );
415
415
}
416
416
0 commit comments