1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | import { backend_util } from '@tensorflow/tfjs';
|
18 | export declare class TensorMetadata {
|
19 | id: number;
|
20 | shape: number[];
|
21 | dtype: number;
|
22 | }
|
23 | export declare class TFEOpAttr {
|
24 | name: string;
|
25 | type: number;
|
26 | value: boolean | number | object | string | number[];
|
27 | }
|
28 | export interface TFJSBinding {
|
29 | TensorMetadata: typeof TensorMetadata;
|
30 | TFEOpAttr: typeof TFEOpAttr;
|
31 | createTensor(shape: number[], dtype: number, buffer: backend_util.BackendValues): number;
|
32 | deleteTensor(tensorId: number): void;
|
33 | tensorDataSync(tensorId: number): Float32Array | Int32Array | Uint8Array;
|
34 | executeOp(opName: string, opAttrs: TFEOpAttr[], inputTensorIds: number[], numOutputs: number): TensorMetadata[];
|
35 | loadSavedModel(exportDir: string, tags: string): number;
|
36 | deleteSavedModel(savedModelId: number): void;
|
37 | runSavedModel(savedModelId: number, inputTensorIds: number[], inputOpNames: string, outputOpNames: string): TensorMetadata[];
|
38 | getNumOfSavedModels(): number;
|
39 | isUsingGpuDevice(): boolean;
|
40 | TF_FLOAT: number;
|
41 | TF_INT32: number;
|
42 | TF_INT64: number;
|
43 | TF_BOOL: number;
|
44 | TF_COMPLEX64: number;
|
45 | TF_STRING: number;
|
46 | TF_RESOURCE: number;
|
47 | TF_UINT8: number;
|
48 | TF_ATTR_STRING: number;
|
49 | TF_ATTR_INT: number;
|
50 | TF_ATTR_FLOAT: number;
|
51 | TF_ATTR_BOOL: number;
|
52 | TF_ATTR_TYPE: number;
|
53 | TF_ATTR_SHAPE: number;
|
54 | TF_ATTR_RESOURCE: number;
|
55 | TF_Version: string;
|
56 | }
|