UNPKG

1.72 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright 2019 Google LLC. All Rights Reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 * =============================================================================
16 */
17/// <amd-module name="@tensorflow/tfjs-converter/dist/operations/custom_op/node_value_impl" />
18import { Tensor } from '@tensorflow/tfjs-core';
19import { NamedTensorsMap } from '../../data/types';
20import { ExecutionContext } from '../../executor/execution_context';
21import { GraphNode, Node, ValueType } from '../types';
22/**
23 * Helper class for lookup inputs and params for nodes in the model graph.
24 */
25export declare class NodeValueImpl implements GraphNode {
26 private node;
27 private tensorMap;
28 private context;
29 readonly inputs: Tensor[];
30 readonly attrs: {
31 [key: string]: ValueType;
32 };
33 constructor(node: Node, tensorMap: NamedTensorsMap, context: ExecutionContext);
34 /**
35 * Return the value of the attribute or input param.
36 * @param name String: name of attribute or input param.
37 */
38 private getInput;
39 /**
40 * Return the value of the attribute or input param.
41 * @param name String: name of attribute or input param.
42 */
43 private getAttr;
44}