forked from tensorflow/tfjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompiled_api.ts
More file actions
552 lines (420 loc) · 12.1 KB
/
compiled_api.ts
File metadata and controls
552 lines (420 loc) · 12.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
/**
* @license
* Copyright 2019 Google LLC. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* =============================================================================
*/
/* tslint:disable */
/** Properties of an Any. */
export declare interface IAny {
/** Any typeUrl */
typeUrl?: (string|null);
/** Any value */
value?: (Uint8Array|null);
}
/** DataType enum. */
export enum DataType {
'DT_INVALID' = 0,
'DT_FLOAT' = 1,
'DT_DOUBLE' = 2,
'DT_INT32' = 3,
'DT_UINT8' = 4,
'DT_INT16' = 5,
'DT_INT8' = 6,
'DT_STRING' = 7,
'DT_COMPLEX64' = 8,
'DT_INT64' = 9,
'DT_BOOL' = 10,
'DT_QINT8' = 11,
'DT_QUINT8' = 12,
'DT_QINT32' = 13,
'DT_BFLOAT16' = 14,
'DT_FLOAT_REF' = 101,
'DT_DOUBLE_REF' = 102,
'DT_INT32_REF' = 103,
'DT_UINT8_REF' = 104,
'DT_INT16_REF' = 105,
'DT_INT8_REF' = 106,
'DT_STRING_REF' = 107,
'DT_COMPLEX64_REF' = 108,
'DT_INT64_REF' = 109,
'DT_BOOL_REF' = 110,
'DT_QINT8_REF' = 111,
'DT_QUINT8_REF' = 112,
'DT_QINT32_REF' = 113,
'DT_BFLOAT16_REF' = 114
}
/** Properties of a TensorShape. */
export declare interface ITensorShape {
/** TensorShape dim */
dim?: (TensorShape.IDim[]|null);
/** TensorShape unknownRank */
unknownRank?: (boolean|null);
}
export namespace TensorShape {
/** Properties of a Dim. */
export declare interface IDim {
/** Dim size */
size?: (number|string|null);
/** Dim name */
name?: (string|null);
}
}
/** Properties of a Tensor. */
export declare interface ITensor {
/** Tensor dtype */
dtype?: (DataType|null);
/** Tensor tensorShape */
tensorShape?: (ITensorShape|null);
/** Tensor versionNumber */
versionNumber?: (number|null);
/** Tensor tensorContent */
tensorContent?: (Uint8Array|null);
/** Tensor floatVal */
floatVal?: (number[]|null);
/** Tensor doubleVal */
doubleVal?: (number[]|null);
/** Tensor intVal */
intVal?: (number[]|null);
/** Tensor stringVal */
stringVal?: (Uint8Array[]|null);
/** Tensor scomplexVal */
scomplexVal?: (number[]|null);
/** Tensor int64Val */
int64Val?: ((number | string)[]|null);
/** Tensor boolVal */
boolVal?: (boolean[]|null);
/** Tensor uint32Val */
uint32Val?: (number[]|null);
/** Tensor uint64Val */
uint64Val?: ((number | string)[]|null);
}
/** Properties of an AttrValue. */
export declare interface IAttrValue {
/** AttrValue list */
list?: (AttrValue.IListValue|null);
/** AttrValue s */
s?: (string|null);
/** AttrValue i */
i?: (number|string|null);
/** AttrValue f */
f?: (number|null);
/** AttrValue b */
b?: (boolean|null);
/** AttrValue type */
type?: (DataType|null);
/** AttrValue shape */
shape?: (ITensorShape|null);
/** AttrValue tensor */
tensor?: (ITensor|null);
/** AttrValue placeholder */
placeholder?: (string|null);
/** AttrValue func */
func?: (INameAttrList|null);
}
export namespace AttrValue {
/** Properties of a ListValue. */
export declare interface IListValue {
/** ListValue s */
s?: (string[]|null);
/** ListValue i */
i?: ((number | string)[]|null);
/** ListValue f */
f?: (number[]|null);
/** ListValue b */
b?: (boolean[]|null);
/** ListValue type */
type?: (DataType[]|null);
/** ListValue shape */
shape?: (ITensorShape[]|null);
/** ListValue tensor */
tensor?: (ITensor[]|null);
/** ListValue func */
func?: (INameAttrList[]|null);
}
}
/** Properties of a NameAttrList. */
export declare interface INameAttrList {
/** NameAttrList name */
name?: (string|null);
/** NameAttrList attr */
attr?: ({[k: string]: IAttrValue}|null);
}
/** Properties of a NodeDef. */
export declare interface INodeDef {
/** NodeDef name */
name?: (string|null);
/** NodeDef op */
op?: (string|null);
/** NodeDef input */
input?: (string[]|null);
/** NodeDef device */
device?: (string|null);
/** NodeDef attr */
attr?: ({[k: string]: IAttrValue}|null);
}
/** Properties of a VersionDef. */
export declare interface IVersionDef {
/** VersionDef producer */
producer?: (number|null);
/** VersionDef minConsumer */
minConsumer?: (number|null);
/** VersionDef badConsumers */
badConsumers?: (number[]|null);
}
/** Properties of a GraphDef. */
export declare interface IGraphDef {
/** GraphDef node */
node?: (INodeDef[]|null);
/** GraphDef versions */
versions?: (IVersionDef|null);
/** GraphDef library */
library?: (IFunctionDefLibrary|null);
}
/** Properties of a CollectionDef. */
export declare interface ICollectionDef {
/** CollectionDef nodeList */
nodeList?: (CollectionDef.INodeList|null);
/** CollectionDef bytesList */
bytesList?: (CollectionDef.IBytesList|null);
/** CollectionDef int64List */
int64List?: (CollectionDef.IInt64List|null);
/** CollectionDef floatList */
floatList?: (CollectionDef.IFloatList|null);
/** CollectionDef anyList */
anyList?: (CollectionDef.IAnyList|null);
}
export namespace CollectionDef {
/** Properties of a NodeList. */
export declare interface INodeList {
/** NodeList value */
value?: (string[]|null);
}
/** Properties of a BytesList. */
export declare interface IBytesList {
/** BytesList value */
value?: (Uint8Array[]|null);
}
/** Properties of an Int64List. */
export declare interface IInt64List {
/** Int64List value */
value?: ((number | string)[]|null);
}
/** Properties of a FloatList. */
export declare interface IFloatList {
/** FloatList value */
value?: (number[]|null);
}
/** Properties of an AnyList. */
export declare interface IAnyList {
/** AnyList value */
value?: (IAny[]|null);
}
}
/** Properties of a SaverDef. */
export declare interface ISaverDef {
/** SaverDef filenameTensorName */
filenameTensorName?: (string|null);
/** SaverDef saveTensorName */
saveTensorName?: (string|null);
/** SaverDef restoreOpName */
restoreOpName?: (string|null);
/** SaverDef maxToKeep */
maxToKeep?: (number|null);
/** SaverDef sharded */
sharded?: (boolean|null);
/** SaverDef keepCheckpointEveryNHours */
keepCheckpointEveryNHours?: (number|null);
/** SaverDef version */
version?: (SaverDef.CheckpointFormatVersion|null);
}
export namespace SaverDef {
/** CheckpointFormatVersion enum. */
export enum CheckpointFormatVersion {'LEGACY' = 0, 'V1' = 1, 'V2' = 2}
}
/** Properties of a TensorInfo. */
export declare interface ITensorInfo {
/** TensorInfo name */
name?: (string|null);
/** TensorInfo cooSparse */
cooSparse?: (TensorInfo.ICooSparse|null);
/** TensorInfo dtype */
dtype?: (DataType|null);
/** TensorInfo tensorShape */
tensorShape?: (ITensorShape|null);
}
export namespace TensorInfo {
/** Properties of a CooSparse. */
export declare interface ICooSparse {
/** CooSparse valuesTensorName */
valuesTensorName?: (string|null);
/** CooSparse indicesTensorName */
indicesTensorName?: (string|null);
/** CooSparse denseShapeTensorName */
denseShapeTensorName?: (string|null);
}
}
/** Properties of a SignatureDef. */
export declare interface ISignatureDef {
/** SignatureDef inputs */
inputs?: ({[k: string]: ITensorInfo}|null);
/** SignatureDef outputs */
outputs?: ({[k: string]: ITensorInfo}|null);
/** SignatureDef methodName */
methodName?: (string|null);
}
/** Properties of an AssetFileDef. */
export declare interface IAssetFileDef {
/** AssetFileDef tensorInfo */
tensorInfo?: (ITensorInfo|null);
/** AssetFileDef filename */
filename?: (string|null);
}
/** Properties of an OpDef. */
export declare interface IOpDef {
/** OpDef name */
name?: (string|null);
/** OpDef inputArg */
inputArg?: (OpDef.IArgDef[]|null);
/** OpDef outputArg */
outputArg?: (OpDef.IArgDef[]|null);
/** OpDef attr */
attr?: (OpDef.IAttrDef[]|null);
/** OpDef deprecation */
deprecation?: (OpDef.IOpDeprecation|null);
/** OpDef summary */
summary?: (string|null);
/** OpDef description */
description?: (string|null);
/** OpDef isCommutative */
isCommutative?: (boolean|null);
/** OpDef isAggregate */
isAggregate?: (boolean|null);
/** OpDef isStateful */
isStateful?: (boolean|null);
/** OpDef allowsUninitializedInput */
allowsUninitializedInput?: (boolean|null);
}
export namespace OpDef {
/** Properties of an ArgDef. */
export declare interface IArgDef {
/** ArgDef name */
name?: (string|null);
/** ArgDef description */
description?: (string|null);
/** ArgDef type */
type?: (DataType|null);
/** ArgDef typeAttr */
typeAttr?: (string|null);
/** ArgDef numberAttr */
numberAttr?: (string|null);
/** ArgDef typeListAttr */
typeListAttr?: (string|null);
/** ArgDef isRef */
isRef?: (boolean|null);
}
/** Properties of an AttrDef. */
export declare interface IAttrDef {
/** AttrDef name */
name?: (string|null);
/** AttrDef type */
type?: (string|null);
/** AttrDef defaultValue */
defaultValue?: (IAttrValue|null);
/** AttrDef description */
description?: (string|null);
/** AttrDef hasMinimum */
hasMinimum?: (boolean|null);
/** AttrDef minimum */
minimum?: (number|string|null);
/** AttrDef allowedValues */
allowedValues?: (IAttrValue|null);
}
/** Properties of an OpDeprecation. */
export declare interface IOpDeprecation {
/** OpDeprecation version */
version?: (number|null);
/** OpDeprecation explanation */
explanation?: (string|null);
}
}
/** Properties of an OpList. */
export declare interface IOpList {
/** OpList op */
op?: (IOpDef[]|null);
}
/** Properties of a MetaGraphDef. */
export declare interface IMetaGraphDef {
/** MetaGraphDef metaInfoDef */
metaInfoDef?: (MetaGraphDef.IMetaInfoDef|null);
/** MetaGraphDef graphDef */
graphDef?: (IGraphDef|null);
/** MetaGraphDef saverDef */
saverDef?: (ISaverDef|null);
/** MetaGraphDef collectionDef */
collectionDef?: ({[k: string]: ICollectionDef}|null);
/** MetaGraphDef signatureDef */
signatureDef?: ({[k: string]: ISignatureDef}|null);
/** MetaGraphDef assetFileDef */
assetFileDef?: (IAssetFileDef[]|null);
}
export namespace MetaGraphDef {
/** Properties of a MetaInfoDef. */
export declare interface IMetaInfoDef {
/** MetaInfoDef metaGraphVersion */
metaGraphVersion?: (string|null);
/** MetaInfoDef strippedOpList */
strippedOpList?: (IOpList|null);
/** MetaInfoDef anyInfo */
anyInfo?: (IAny|null);
/** MetaInfoDef tags */
tags?: (string[]|null);
/** MetaInfoDef tensorflowVersion */
tensorflowVersion?: (string|null);
/** MetaInfoDef tensorflowGitVersion */
tensorflowGitVersion?: (string|null);
}
}
/** Properties of a SavedModel. */
export declare interface ISavedModel {
/** SavedModel savedModelSchemaVersion */
savedModelSchemaVersion?: (number|string|null);
/** SavedModel metaGraphs */
metaGraphs?: (IMetaGraphDef[]|null);
}
/** Properties of a FunctionDefLibrary. */
export declare interface IFunctionDefLibrary {
/** FunctionDefLibrary function */
'function'?: (IFunctionDef[]|null);
/** FunctionDefLibrary gradient */
gradient?: (IGradientDef[]|null);
}
/** Properties of a FunctionDef. */
export declare interface IFunctionDef {
/** FunctionDef signature */
signature?: (IOpDef|null);
/** FunctionDef attr */
attr?: ({[k: string]: IAttrValue}|null);
/** FunctionDef nodeDef */
nodeDef?: (INodeDef[]|null);
/** FunctionDef ret */
ret?: ({[k: string]: string}|null);
}
/** Properties of a GradientDef. */
export declare interface IGradientDef {
/** GradientDef functionName */
functionName?: (string|null);
/** GradientDef gradientFunc */
gradientFunc?: (string|null);
}