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 | string | null);
|
280 |
|
281 | tensorShape?: (ITensorShape | null);
|
282 |
|
283 | resourceId?: (number | null);
|
284 | }
|
285 | export declare namespace TensorInfo {
|
286 |
|
287 | interface ICooSparse {
|
288 |
|
289 | valuesTensorName?: (string | null);
|
290 |
|
291 | indicesTensorName?: (string | null);
|
292 |
|
293 | denseShapeTensorName?: (string | null);
|
294 | }
|
295 | }
|
296 |
|
297 | export declare interface ISignatureDef {
|
298 |
|
299 | inputs?: ({
|
300 | [k: string]: ITensorInfo;
|
301 | } | null);
|
302 |
|
303 | outputs?: ({
|
304 | [k: string]: ITensorInfo;
|
305 | } | null);
|
306 |
|
307 | methodName?: (string | null);
|
308 | }
|
309 |
|
310 | export declare interface IAssetFileDef {
|
311 |
|
312 | tensorInfo?: (ITensorInfo | null);
|
313 |
|
314 | filename?: (string | null);
|
315 | }
|
316 |
|
317 | export declare interface IOpDef {
|
318 |
|
319 | name?: (string | null);
|
320 |
|
321 | inputArg?: (OpDef.IArgDef[] | null);
|
322 |
|
323 | outputArg?: (OpDef.IArgDef[] | null);
|
324 |
|
325 | attr?: (OpDef.IAttrDef[] | null);
|
326 |
|
327 | deprecation?: (OpDef.IOpDeprecation | null);
|
328 |
|
329 | summary?: (string | null);
|
330 |
|
331 | description?: (string | null);
|
332 |
|
333 | isCommutative?: (boolean | null);
|
334 |
|
335 | isAggregate?: (boolean | null);
|
336 |
|
337 | isStateful?: (boolean | null);
|
338 |
|
339 | allowsUninitializedInput?: (boolean | null);
|
340 | }
|
341 | export declare namespace OpDef {
|
342 |
|
343 | interface IArgDef {
|
344 |
|
345 | name?: (string | null);
|
346 |
|
347 | description?: (string | null);
|
348 |
|
349 | type?: (DataType | null);
|
350 |
|
351 | typeAttr?: (string | null);
|
352 |
|
353 | numberAttr?: (string | null);
|
354 |
|
355 | typeListAttr?: (string | null);
|
356 |
|
357 | isRef?: (boolean | null);
|
358 | }
|
359 |
|
360 | interface IAttrDef {
|
361 |
|
362 | name?: (string | null);
|
363 |
|
364 | type?: (string | null);
|
365 |
|
366 | defaultValue?: (IAttrValue | null);
|
367 |
|
368 | description?: (string | null);
|
369 |
|
370 | hasMinimum?: (boolean | null);
|
371 |
|
372 | minimum?: (number | string | null);
|
373 |
|
374 | allowedValues?: (IAttrValue | null);
|
375 | }
|
376 |
|
377 | interface IOpDeprecation {
|
378 |
|
379 | version?: (number | null);
|
380 |
|
381 | explanation?: (string | null);
|
382 | }
|
383 | }
|
384 |
|
385 | export declare interface IOpList {
|
386 |
|
387 | op?: (IOpDef[] | null);
|
388 | }
|
389 |
|
390 | export declare interface IMetaGraphDef {
|
391 |
|
392 | metaInfoDef?: (MetaGraphDef.IMetaInfoDef | null);
|
393 |
|
394 | graphDef?: (IGraphDef | null);
|
395 |
|
396 | saverDef?: (ISaverDef | null);
|
397 |
|
398 | collectionDef?: ({
|
399 | [k: string]: ICollectionDef;
|
400 | } | null);
|
401 |
|
402 | signatureDef?: ({
|
403 | [k: string]: ISignatureDef;
|
404 | } | null);
|
405 |
|
406 | assetFileDef?: (IAssetFileDef[] | null);
|
407 | }
|
408 | export declare namespace MetaGraphDef {
|
409 |
|
410 | interface IMetaInfoDef {
|
411 |
|
412 | metaGraphVersion?: (string | null);
|
413 |
|
414 | strippedOpList?: (IOpList | null);
|
415 |
|
416 | anyInfo?: (IAny | null);
|
417 |
|
418 | tags?: (string[] | null);
|
419 |
|
420 | tensorflowVersion?: (string | null);
|
421 |
|
422 | tensorflowGitVersion?: (string | null);
|
423 | }
|
424 | }
|
425 |
|
426 | export declare interface ISavedModel {
|
427 |
|
428 | savedModelSchemaVersion?: (number | string | null);
|
429 |
|
430 | metaGraphs?: (IMetaGraphDef[] | null);
|
431 | }
|
432 |
|
433 | export declare interface IFunctionDefLibrary {
|
434 |
|
435 | 'function'?: (IFunctionDef[] | null);
|
436 |
|
437 | gradient?: (IGradientDef[] | null);
|
438 | }
|
439 |
|
440 | export declare interface IFunctionDef {
|
441 |
|
442 | signature?: (IOpDef | null);
|
443 |
|
444 | attr?: ({
|
445 | [k: string]: IAttrValue;
|
446 | } | null);
|
447 |
|
448 | nodeDef?: (INodeDef[] | null);
|
449 |
|
450 | ret?: ({
|
451 | [k: string]: string;
|
452 | } | null);
|
453 | }
|
454 |
|
455 | export declare interface IGradientDef {
|
456 |
|
457 | functionName?: (string | null);
|
458 |
|
459 | gradientFunc?: (string | null);
|
460 | }
|