1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export declare interface IAny {
|
21 |
|
22 | typeUrl?: (string | null);
|
23 |
|
24 | value?: (Uint8Array | null);
|
25 | }
|
26 |
|
27 | export declare enum DataType {
|
28 | DT_INVALID = 0,
|
29 | DT_FLOAT = 1,
|
30 | DT_DOUBLE = 2,
|
31 | DT_INT32 = 3,
|
32 | DT_UINT8 = 4,
|
33 | DT_INT16 = 5,
|
34 | DT_INT8 = 6,
|
35 | DT_STRING = 7,
|
36 | DT_COMPLEX64 = 8,
|
37 | DT_INT64 = 9,
|
38 | DT_BOOL = 10,
|
39 | DT_QINT8 = 11,
|
40 | DT_QUINT8 = 12,
|
41 | DT_QINT32 = 13,
|
42 | DT_BFLOAT16 = 14,
|
43 | DT_QINT16 = 15,
|
44 | DT_QUINT16 = 16,
|
45 | DT_UINT16 = 17,
|
46 | DT_COMPLEX128 = 18,
|
47 | DT_HALF = 19,
|
48 | DT_RESOURCE = 20,
|
49 | DT_VARIANT = 21,
|
50 | DT_UINT32 = 22,
|
51 | DT_UINT64 = 23,
|
52 | DT_FLOAT_REF = 101,
|
53 | DT_DOUBLE_REF = 102,
|
54 | DT_INT32_REF = 103,
|
55 | DT_UINT8_REF = 104,
|
56 | DT_INT16_REF = 105,
|
57 | DT_INT8_REF = 106,
|
58 | DT_STRING_REF = 107,
|
59 | DT_COMPLEX64_REF = 108,
|
60 | DT_INT64_REF = 109,
|
61 | DT_BOOL_REF = 110,
|
62 | DT_QINT8_REF = 111,
|
63 | DT_QUINT8_REF = 112,
|
64 | DT_QINT32_REF = 113,
|
65 | DT_BFLOAT16_REF = 114,
|
66 | DT_QINT16_REF = 115,
|
67 | DT_QUINT16_REF = 116,
|
68 | DT_UINT16_REF = 117,
|
69 | DT_COMPLEX128_REF = 118,
|
70 | DT_HALF_REF = 119,
|
71 | DT_RESOURCE_REF = 120,
|
72 | DT_VARIANT_REF = 121,
|
73 | DT_UINT32_REF = 122,
|
74 | DT_UINT64_REF = 123
|
75 | }
|
76 |
|
77 | export declare interface ITensorShape {
|
78 |
|
79 | dim?: (TensorShape.IDim[] | null);
|
80 |
|
81 | unknownRank?: (boolean | null);
|
82 | }
|
83 | export declare namespace TensorShape {
|
84 |
|
85 | interface IDim {
|
86 |
|
87 | size?: (number | string | null);
|
88 |
|
89 | name?: (string | null);
|
90 | }
|
91 | }
|
92 |
|
93 | export declare interface ITensor {
|
94 |
|
95 | dtype?: (DataType | null);
|
96 |
|
97 | tensorShape?: (ITensorShape | null);
|
98 |
|
99 | versionNumber?: (number | null);
|
100 |
|
101 | tensorContent?: (Uint8Array | null);
|
102 |
|
103 | floatVal?: (number[] | null);
|
104 |
|
105 | doubleVal?: (number[] | null);
|
106 |
|
107 | intVal?: (number[] | null);
|
108 |
|
109 | stringVal?: (Uint8Array[] | null);
|
110 |
|
111 | scomplexVal?: (number[] | null);
|
112 |
|
113 | int64Val?: ((number | string)[] | null);
|
114 |
|
115 | boolVal?: (boolean[] | null);
|
116 |
|
117 | uint32Val?: (number[] | null);
|
118 |
|
119 | uint64Val?: ((number | string)[] | null);
|
120 | }
|
121 |
|
122 | export declare interface IAttrValue {
|
123 |
|
124 | list?: (AttrValue.IListValue | null);
|
125 |
|
126 | s?: (string | null);
|
127 |
|
128 | i?: (number | string | null);
|
129 |
|
130 | f?: (number | null);
|
131 |
|
132 | b?: (boolean | null);
|
133 |
|
134 | type?: (DataType | null);
|
135 |
|
136 | shape?: (ITensorShape | null);
|
137 |
|
138 | tensor?: (ITensor | null);
|
139 |
|
140 | placeholder?: (string | null);
|
141 |
|
142 | func?: (INameAttrList | null);
|
143 | }
|
144 | export declare namespace AttrValue {
|
145 |
|
146 | interface IListValue {
|
147 |
|
148 | s?: (string[] | null);
|
149 |
|
150 | i?: ((number | string)[] | null);
|
151 |
|
152 | f?: (number[] | null);
|
153 |
|
154 | b?: (boolean[] | null);
|
155 |
|
156 | type?: (DataType[] | null);
|
157 |
|
158 | shape?: (ITensorShape[] | null);
|
159 |
|
160 | tensor?: (ITensor[] | null);
|
161 |
|
162 | func?: (INameAttrList[] | null);
|
163 | }
|
164 | }
|
165 |
|
166 | export declare interface INameAttrList {
|
167 |
|
168 | name?: (string | null);
|
169 |
|
170 | attr?: ({
|
171 | [k: string]: IAttrValue;
|
172 | } | null);
|
173 | }
|
174 |
|
175 | export declare interface INodeDef {
|
176 |
|
177 | name?: (string | null);
|
178 |
|
179 | op?: (string | null);
|
180 |
|
181 | input?: (string[] | null);
|
182 |
|
183 | device?: (string | null);
|
184 |
|
185 | attr?: ({
|
186 | [k: string]: IAttrValue;
|
187 | } | null);
|
188 | }
|
189 |
|
190 | export declare interface IVersionDef {
|
191 |
|
192 | producer?: (number | null);
|
193 |
|
194 | minConsumer?: (number | null);
|
195 |
|
196 | badConsumers?: (number[] | null);
|
197 | }
|
198 |
|
199 | export declare interface IGraphDef {
|
200 |
|
201 | node?: (INodeDef[] | null);
|
202 |
|
203 | versions?: (IVersionDef | null);
|
204 |
|
205 | library?: (IFunctionDefLibrary | null);
|
206 | }
|
207 |
|
208 | export declare interface ICollectionDef {
|
209 |
|
210 | nodeList?: (CollectionDef.INodeList | null);
|
211 |
|
212 | bytesList?: (CollectionDef.IBytesList | null);
|
213 |
|
214 | int64List?: (CollectionDef.IInt64List | null);
|
215 |
|
216 | floatList?: (CollectionDef.IFloatList | null);
|
217 |
|
218 | anyList?: (CollectionDef.IAnyList | null);
|
219 | }
|
220 | export declare namespace CollectionDef {
|
221 |
|
222 | interface INodeList {
|
223 |
|
224 | value?: (string[] | null);
|
225 | }
|
226 |
|
227 | interface IBytesList {
|
228 |
|
229 | value?: (Uint8Array[] | null);
|
230 | }
|
231 |
|
232 | interface IInt64List {
|
233 |
|
234 | value?: ((number | string)[] | null);
|
235 | }
|
236 |
|
237 | interface IFloatList {
|
238 |
|
239 | value?: (number[] | null);
|
240 | }
|
241 |
|
242 | interface IAnyList {
|
243 |
|
244 | value?: (IAny[] | null);
|
245 | }
|
246 | }
|
247 |
|
248 | export declare interface ISaverDef {
|
249 |
|
250 | filenameTensorName?: (string | null);
|
251 |
|
252 | saveTensorName?: (string | null);
|
253 |
|
254 | restoreOpName?: (string | null);
|
255 |
|
256 | maxToKeep?: (number | null);
|
257 |
|
258 | sharded?: (boolean | null);
|
259 |
|
260 | keepCheckpointEveryNHours?: (number | null);
|
261 |
|
262 | version?: (SaverDef.CheckpointFormatVersion | null);
|
263 | }
|
264 | export declare namespace SaverDef {
|
265 |
|
266 | enum CheckpointFormatVersion {
|
267 | 'LEGACY' = 0,
|
268 | 'V1' = 1,
|
269 | 'V2' = 2
|
270 | }
|
271 | }
|
272 |
|
273 | export declare interface ITensorInfo {
|
274 |
|
275 | name?: (string | null);
|
276 |
|
277 | cooSparse?: (TensorInfo.ICooSparse | null);
|
278 |
|
279 | dtype?: (DataType | null);
|
280 |
|
281 | tensorShape?: (ITensorShape | null);
|
282 | }
|
283 | export declare namespace TensorInfo {
|
284 |
|
285 | interface ICooSparse {
|
286 |
|
287 | valuesTensorName?: (string | null);
|
288 |
|
289 | indicesTensorName?: (string | null);
|
290 |
|
291 | denseShapeTensorName?: (string | null);
|
292 | }
|
293 | }
|
294 |
|
295 | export declare interface ISignatureDef {
|
296 |
|
297 | inputs?: ({
|
298 | [k: string]: ITensorInfo;
|
299 | } | null);
|
300 |
|
301 | outputs?: ({
|
302 | [k: string]: ITensorInfo;
|
303 | } | null);
|
304 |
|
305 | methodName?: (string | null);
|
306 | }
|
307 |
|
308 | export declare interface IAssetFileDef {
|
309 |
|
310 | tensorInfo?: (ITensorInfo | null);
|
311 |
|
312 | filename?: (string | null);
|
313 | }
|
314 |
|
315 | export declare interface IOpDef {
|
316 |
|
317 | name?: (string | null);
|
318 |
|
319 | inputArg?: (OpDef.IArgDef[] | null);
|
320 |
|
321 | outputArg?: (OpDef.IArgDef[] | null);
|
322 |
|
323 | attr?: (OpDef.IAttrDef[] | null);
|
324 |
|
325 | deprecation?: (OpDef.IOpDeprecation | null);
|
326 |
|
327 | summary?: (string | null);
|
328 |
|
329 | description?: (string | null);
|
330 |
|
331 | isCommutative?: (boolean | null);
|
332 |
|
333 | isAggregate?: (boolean | null);
|
334 |
|
335 | isStateful?: (boolean | null);
|
336 |
|
337 | allowsUninitializedInput?: (boolean | null);
|
338 | }
|
339 | export declare namespace OpDef {
|
340 |
|
341 | interface IArgDef {
|
342 |
|
343 | name?: (string | null);
|
344 |
|
345 | description?: (string | null);
|
346 |
|
347 | type?: (DataType | null);
|
348 |
|
349 | typeAttr?: (string | null);
|
350 |
|
351 | numberAttr?: (string | null);
|
352 |
|
353 | typeListAttr?: (string | null);
|
354 |
|
355 | isRef?: (boolean | null);
|
356 | }
|
357 |
|
358 | interface IAttrDef {
|
359 |
|
360 | name?: (string | null);
|
361 |
|
362 | type?: (string | null);
|
363 |
|
364 | defaultValue?: (IAttrValue | null);
|
365 |
|
366 | description?: (string | null);
|
367 |
|
368 | hasMinimum?: (boolean | null);
|
369 |
|
370 | minimum?: (number | string | null);
|
371 |
|
372 | allowedValues?: (IAttrValue | null);
|
373 | }
|
374 |
|
375 | interface IOpDeprecation {
|
376 |
|
377 | version?: (number | null);
|
378 |
|
379 | explanation?: (string | null);
|
380 | }
|
381 | }
|
382 |
|
383 | export declare interface IOpList {
|
384 |
|
385 | op?: (IOpDef[] | null);
|
386 | }
|
387 |
|
388 | export declare interface IMetaGraphDef {
|
389 |
|
390 | metaInfoDef?: (MetaGraphDef.IMetaInfoDef | null);
|
391 |
|
392 | graphDef?: (IGraphDef | null);
|
393 |
|
394 | saverDef?: (ISaverDef | null);
|
395 |
|
396 | collectionDef?: ({
|
397 | [k: string]: ICollectionDef;
|
398 | } | null);
|
399 |
|
400 | signatureDef?: ({
|
401 | [k: string]: ISignatureDef;
|
402 | } | null);
|
403 |
|
404 | assetFileDef?: (IAssetFileDef[] | null);
|
405 | }
|
406 | export declare namespace MetaGraphDef {
|
407 |
|
408 | interface IMetaInfoDef {
|
409 |
|
410 | metaGraphVersion?: (string | null);
|
411 |
|
412 | strippedOpList?: (IOpList | null);
|
413 |
|
414 | anyInfo?: (IAny | null);
|
415 |
|
416 | tags?: (string[] | null);
|
417 |
|
418 | tensorflowVersion?: (string | null);
|
419 |
|
420 | tensorflowGitVersion?: (string | null);
|
421 | }
|
422 | }
|
423 |
|
424 | export declare interface ISavedModel {
|
425 |
|
426 | savedModelSchemaVersion?: (number | string | null);
|
427 |
|
428 | metaGraphs?: (IMetaGraphDef[] | null);
|
429 | }
|
430 |
|
431 | export declare interface IFunctionDefLibrary {
|
432 |
|
433 | 'function'?: (IFunctionDef[] | null);
|
434 |
|
435 | gradient?: (IGradientDef[] | null);
|
436 | }
|
437 |
|
438 | export declare interface IFunctionDef {
|
439 |
|
440 | signature?: (IOpDef | null);
|
441 |
|
442 | attr?: ({
|
443 | [k: string]: IAttrValue;
|
444 | } | null);
|
445 |
|
446 | nodeDef?: (INodeDef[] | null);
|
447 |
|
448 | ret?: ({
|
449 | [k: string]: string;
|
450 | } | null);
|
451 | }
|
452 |
|
453 | export declare interface IGradientDef {
|
454 |
|
455 | functionName?: (string | null);
|
456 |
|
457 | gradientFunc?: (string | null);
|
458 | }
|