1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | import { DataType } from '@tensorflow/tfjs-core';
|
19 | import * as tensorflow from '../data/compiled_api';
|
20 | import { Graph } from './types';
|
21 | export declare class OperationMapper {
|
22 | private static _instance;
|
23 | private opMappers;
|
24 | static get Instance(): OperationMapper;
|
25 | private constructor();
|
26 | transformGraph(graph: tensorflow.IGraphDef, signature?: tensorflow.ISignatureDef): Graph;
|
27 | private mapSignatureEntries;
|
28 | private mapNode;
|
29 | private mapFunction;
|
30 | private mapArgsToSignature;
|
31 | private mapArgToTensorInfo;
|
32 | }
|
33 | export declare function decodeBase64(text: string): string;
|
34 | export declare function parseStringParam(s: [] | string, keepCase: boolean): string;
|
35 | export declare function getStringParam(attrs: {
|
36 | [key: string]: tensorflow.IAttrValue;
|
37 | }, name: string, def: string, keepCase?: boolean): string;
|
38 | export declare function getBoolParam(attrs: {
|
39 | [key: string]: tensorflow.IAttrValue;
|
40 | }, name: string, def: boolean): boolean;
|
41 | export declare function getNumberParam(attrs: {
|
42 | [key: string]: tensorflow.IAttrValue;
|
43 | }, name: string, def: number): number;
|
44 | export declare function parseDtypeParam(value: string | tensorflow.DataType): DataType;
|
45 | export declare function getFuncParam(attrs: {
|
46 | [key: string]: tensorflow.IAttrValue;
|
47 | }, name: string, def: string): string;
|
48 | export declare function getDtypeParam(attrs: {
|
49 | [key: string]: tensorflow.IAttrValue;
|
50 | }, name: string, def: DataType): DataType;
|
51 | export declare function getDtypeArrayParam(attrs: {
|
52 | [key: string]: tensorflow.IAttrValue;
|
53 | }, name: string, def: DataType[]): DataType[];
|
54 | export declare function parseTensorShapeParam(shape: tensorflow.ITensorShape): number[] | undefined;
|
55 | export declare function getTensorShapeParam(attrs: {
|
56 | [key: string]: tensorflow.IAttrValue;
|
57 | }, name: string, def?: number[]): number[] | undefined;
|
58 | export declare function getNumericArrayParam(attrs: {
|
59 | [key: string]: tensorflow.IAttrValue;
|
60 | }, name: string, def: number[]): number[];
|
61 | export declare function getStringArrayParam(attrs: {
|
62 | [key: string]: tensorflow.IAttrValue;
|
63 | }, name: string, def: string[], keepCase?: boolean): string[];
|
64 | export declare function getTensorShapeArrayParam(attrs: {
|
65 | [key: string]: tensorflow.IAttrValue;
|
66 | }, name: string, def: number[][]): number[][];
|
67 | export declare function getBoolArrayParam(attrs: {
|
68 | [key: string]: tensorflow.IAttrValue;
|
69 | }, name: string, def: boolean[]): boolean[];
|