@tensorflow/tfjs-converter
Advanced tools
Comparing version 1.0.0-alpha2 to 1.0.0-alpha3
@@ -130,3 +130,3 @@ "use strict"; | ||
ops.sort(function (a, b) { return a.tfOpName.localeCompare(b.tfOpName); }).forEach(function (element) { | ||
output.push("|" + element.tfOpName + "|" + element.dlOpName + "|\n"); | ||
output.push("|" + element.tfOpName + "|" + element.tfOpName + "|\n"); | ||
}); | ||
@@ -136,3 +136,3 @@ coreOps | ||
.forEach(function (element) { | ||
if (!ops.find(function (op) { return op.dlOpName === element.symbolName; })) { | ||
if (!ops.find(function (op) { return op.tfOpName === element.symbolName; })) { | ||
output.push("|Not mapped|" + element.symbolName + "|\n"); | ||
@@ -139,0 +139,0 @@ } |
@@ -134,30 +134,2 @@ /** | ||
} | ||
/** | ||
* Load the frozen model through url. | ||
* | ||
* Example of loading the MobileNetV2 model and making a prediction with a zero | ||
* input. | ||
* | ||
* ```js | ||
* const GOOGLE_CLOUD_STORAGE_DIR = | ||
* 'https://storage.googleapis.com/tfjs-models/savedmodel/'; | ||
* const MODEL_URL = 'mobilenet_v2_1.0_224/tensorflowjs_model.pb'; | ||
* const WEIGHTS_URL = | ||
* 'mobilenet_v2_1.0_224/weights_manifest.json'; | ||
* const model = await tf.loadFrozenModel(GOOGLE_CLOUD_STORAGE_DIR + MODEL_URL, | ||
* GOOGLE_CLOUD_STORAGE_DIR + WEIGHTS_URL); | ||
* const zeros = tf.zeros([1, 224, 224, 3]); | ||
* model.predict(zeros).print(); | ||
* ``` | ||
* | ||
* @param modelUrl url for the model file generated by scripts/convert.py | ||
* script. | ||
* @param weightManifestUrl url for the weight file generated by | ||
* scripts/convert.py script. | ||
* @param requestOption options for Request, which allows to send credentials | ||
* and custom headers. | ||
* @param onProgress Optional, progress callback function, fired periodically | ||
* before the load is completed. | ||
*/ | ||
/** @doc {heading: 'Models', subheading: 'Loading'} */ | ||
export declare function loadFrozenModel(modelUrl: string, weightsManifestUrl: string, requestOption?: RequestInit, onProgress?: Function): Promise<FrozenModel>; | ||
@@ -164,0 +136,0 @@ /** |
@@ -315,30 +315,2 @@ "use strict"; | ||
exports.FrozenModel = FrozenModel; | ||
/** | ||
* Load the frozen model through url. | ||
* | ||
* Example of loading the MobileNetV2 model and making a prediction with a zero | ||
* input. | ||
* | ||
* ```js | ||
* const GOOGLE_CLOUD_STORAGE_DIR = | ||
* 'https://storage.googleapis.com/tfjs-models/savedmodel/'; | ||
* const MODEL_URL = 'mobilenet_v2_1.0_224/tensorflowjs_model.pb'; | ||
* const WEIGHTS_URL = | ||
* 'mobilenet_v2_1.0_224/weights_manifest.json'; | ||
* const model = await tf.loadFrozenModel(GOOGLE_CLOUD_STORAGE_DIR + MODEL_URL, | ||
* GOOGLE_CLOUD_STORAGE_DIR + WEIGHTS_URL); | ||
* const zeros = tf.zeros([1, 224, 224, 3]); | ||
* model.predict(zeros).print(); | ||
* ``` | ||
* | ||
* @param modelUrl url for the model file generated by scripts/convert.py | ||
* script. | ||
* @param weightManifestUrl url for the weight file generated by | ||
* scripts/convert.py script. | ||
* @param requestOption options for Request, which allows to send credentials | ||
* and custom headers. | ||
* @param onProgress Optional, progress callback function, fired periodically | ||
* before the load is completed. | ||
*/ | ||
/** @doc {heading: 'Models', subheading: 'Loading'} */ | ||
function loadFrozenModel(modelUrl, weightsManifestUrl, requestOption, onProgress) { | ||
@@ -345,0 +317,0 @@ return __awaiter(this, void 0, void 0, function () { |
@@ -94,5 +94,7 @@ "use strict"; | ||
name: node.name, | ||
shape: node.params['shape'] ? node.params['shape'].value : | ||
shape: node.attrParams['shape'] ? | ||
node.attrParams['shape'].value : | ||
undefined, | ||
dtype: node.params['dtype'] ? node.params['dtype'].value : | ||
dtype: node.attrParams['dtype'] ? | ||
node.attrParams['dtype'].value : | ||
undefined | ||
@@ -110,5 +112,7 @@ }; | ||
name: node.name, | ||
shape: node.params['shape'] ? node.params['shape'].value : | ||
shape: node.attrParams['shape'] ? | ||
node.attrParams['shape'].value : | ||
undefined, | ||
dtype: node.params['dtype'] ? node.params['dtype'].value : | ||
dtype: node.attrParams['dtype'] ? | ||
node.attrParams['dtype'].value : | ||
undefined | ||
@@ -299,3 +303,4 @@ }; | ||
tensorArray.forEach(function (tensor) { | ||
if (tensor && outputIds.indexOf(tensor.id) === -1 && | ||
if (tensor && !tensor.isDisposed && | ||
outputIds.indexOf(tensor.id) === -1 && | ||
inputIds.indexOf(tensor.id) === -1 && | ||
@@ -357,3 +362,3 @@ _this.weightIds.indexOf(tensor.id) === -1) { | ||
// whole loop. | ||
if (item.node.op === 'enter' && | ||
if (item.node.op === 'Enter' && | ||
utils_1.getParamValue('isConstant', item.node, tensorMap, context)) { | ||
@@ -399,3 +404,3 @@ nodeName = utils_1.getNodeNameAndIndex(item.node.name, context)[0]; | ||
// Merge op can be pushed if any of its inputs has value. | ||
if (childNode.op === 'merge') { | ||
if (childNode.op === 'Merge') { | ||
if (childNode.inputNames.some(function (name) { | ||
@@ -448,4 +453,4 @@ return !!utils_1.getTensor(name, tensorMap, context); | ||
var input = inputTensors[0]; | ||
if (node.params['shape'] && node.params['shape'].value) { | ||
var shape_1 = node.params['shape'].value; | ||
if (node.attrParams['shape'] && node.attrParams['shape'].value) { | ||
var shape_1 = node.attrParams['shape'].value; | ||
var match = shape_1.length === input.shape.length && | ||
@@ -455,4 +460,4 @@ input.shape.every(function (dim, index) { return shape_1[index] === -1 || shape_1[index] === dim; }); | ||
} | ||
if (node.params['dtype'] && node.params['dtype'].value) { | ||
tfjs_core_1.util.assert(input.dtype === node.params['dtype'].value, "The dtype of dict['" + node.name + "'] provided in model.execute(dict) must be " + node.params['dtype'].value + ", but was " + input.dtype); | ||
if (node.attrParams['dtype'] && node.attrParams['dtype'].value) { | ||
tfjs_core_1.util.assert(input.dtype === node.attrParams['dtype'].value, "The dtype of dict['" + node.name + "'] provided in model.execute(dict) must be " + node.attrParams['dtype'].value + ", but was " + input.dtype); | ||
} | ||
@@ -459,0 +464,0 @@ }); |
@@ -17,6 +17,69 @@ /** | ||
*/ | ||
import { io } from '@tensorflow/tfjs-core'; | ||
import { FrozenModel } from './executor/frozen_model'; | ||
export { FrozenModel, loadTfHubModule } from './executor/frozen_model'; | ||
export { FrozenModel as GraphModel } from './executor/frozen_model'; | ||
export { FrozenModel as FrozenModelJSON } from './executor/frozen_model_json'; | ||
export { version as version_converter } from './version'; | ||
export declare function loadFrozenModel(modelUrl: string, weightsManifestUrl: string, requestOption?: RequestInit): Promise<FrozenModel>; | ||
/** | ||
* Deprecated. Use `tf.loadGraphModel`. | ||
* | ||
* Load the frozen model through url. | ||
* | ||
* Example of loading the MobileNetV2 model and making a prediction with a zero | ||
* input. | ||
* | ||
* ```js | ||
* const GOOGLE_CLOUD_STORAGE_DIR = | ||
* 'https://storage.googleapis.com/tfjs-models/savedmodel/'; | ||
* const MODEL_URL = 'mobilenet_v2_1.0_224/tensorflowjs_model.pb'; | ||
* const WEIGHTS_URL = | ||
* 'mobilenet_v2_1.0_224/weights_manifest.json'; | ||
* const model = await tf.loadFrozenModel(GOOGLE_CLOUD_STORAGE_DIR + MODEL_URL, | ||
* GOOGLE_CLOUD_STORAGE_DIR + WEIGHTS_URL); | ||
* const zeros = tf.zeros([1, 224, 224, 3]); | ||
* model.predict(zeros).print(); | ||
* ``` | ||
* | ||
* @param modelUrl url for the model file generated by scripts/convert.py | ||
* script. | ||
* @param weightManifestUrl url for the weight file generated by | ||
* scripts/convert.py script. | ||
* @param requestOption options for Request, which allows to send credentials | ||
* and custom headers. | ||
* @param onProgress Optional, progress callback function, fired periodically | ||
* before the load is completed. | ||
*/ | ||
/** @doc {heading: 'Models', subheading: 'Loading'} */ | ||
export declare function loadFrozenModel(modelUrl: string, weightsManifestUrl?: string, requestOption?: RequestInit, onProgress?: Function): Promise<FrozenModel>; | ||
/** | ||
* Load a graph model given a URL to the model definition. | ||
* | ||
* Example of loading MobileNetV2 from a URL and making a prediction with a | ||
* zeros input: | ||
* | ||
* ```js | ||
* const modelUrl = | ||
* 'https://storage.googleapis.com/tfjs-models/savedmodel/mobilenet_v2_1.0_224/tensorflowjs_model.pb'; | ||
* const model = await tf.loadGraphModel(modelUrl); | ||
* const zeros = tf.zeros([1, 224, 224, 3]); | ||
* model.predict(zeros).print(); | ||
* ``` | ||
* | ||
* Example of loading MobileNetV2 from a TF Hub URL and making a prediction with | ||
* a zeros input: | ||
* | ||
* ```js | ||
* const modelUrl = | ||
* 'https://tfhub.dev/google/imagenet/mobilenet_v2_140_224/classification/2'; | ||
* const model = await tf.loadGraphModel(modelUrl, {fromTFHub: true}); | ||
* const zeros = tf.zeros([1, 224, 224, 3]); | ||
* model.predict(zeros).print(); | ||
* ``` | ||
* @param modelUrl url for the model file generated by scripts/convert.py | ||
* script or a TF Hub url. | ||
* @param options options for the Request, which allows to send credentials | ||
* and custom headers. | ||
*/ | ||
/** @doc {heading: 'Models', subheading: 'Loading'} */ | ||
export declare function loadGraphModel(modelUrl: string, options?: io.LoadOptions): Promise<FrozenModel>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* @license | ||
* Copyright 2018 Google LLC. All Rights Reserved. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* ============================================================================= | ||
*/ | ||
var frozen_model_1 = require("./executor/frozen_model"); | ||
@@ -24,2 +8,4 @@ var frozen_model_json_1 = require("./executor/frozen_model_json"); | ||
exports.loadTfHubModule = frozen_model_2.loadTfHubModule; | ||
var frozen_model_3 = require("./executor/frozen_model"); | ||
exports.GraphModel = frozen_model_3.FrozenModel; | ||
var frozen_model_json_2 = require("./executor/frozen_model_json"); | ||
@@ -29,10 +15,100 @@ exports.FrozenModelJSON = frozen_model_json_2.FrozenModel; | ||
exports.version_converter = version_1.version; | ||
function loadFrozenModel(modelUrl, weightsManifestUrl, requestOption) { | ||
/** | ||
* Deprecated. Use `tf.loadGraphModel`. | ||
* | ||
* Load the frozen model through url. | ||
* | ||
* Example of loading the MobileNetV2 model and making a prediction with a zero | ||
* input. | ||
* | ||
* ```js | ||
* const GOOGLE_CLOUD_STORAGE_DIR = | ||
* 'https://storage.googleapis.com/tfjs-models/savedmodel/'; | ||
* const MODEL_URL = 'mobilenet_v2_1.0_224/tensorflowjs_model.pb'; | ||
* const WEIGHTS_URL = | ||
* 'mobilenet_v2_1.0_224/weights_manifest.json'; | ||
* const model = await tf.loadFrozenModel(GOOGLE_CLOUD_STORAGE_DIR + MODEL_URL, | ||
* GOOGLE_CLOUD_STORAGE_DIR + WEIGHTS_URL); | ||
* const zeros = tf.zeros([1, 224, 224, 3]); | ||
* model.predict(zeros).print(); | ||
* ``` | ||
* | ||
* @param modelUrl url for the model file generated by scripts/convert.py | ||
* script. | ||
* @param weightManifestUrl url for the weight file generated by | ||
* scripts/convert.py script. | ||
* @param requestOption options for Request, which allows to send credentials | ||
* and custom headers. | ||
* @param onProgress Optional, progress callback function, fired periodically | ||
* before the load is completed. | ||
*/ | ||
/** @doc {heading: 'Models', subheading: 'Loading'} */ | ||
function loadFrozenModel(modelUrl, weightsManifestUrl, requestOption, onProgress) { | ||
if (modelUrl && modelUrl.endsWith('.json')) { | ||
// tslint:disable-next-line:no-any | ||
return frozen_model_json_1.loadFrozenModel(modelUrl, requestOption); | ||
return frozen_model_json_1.loadFrozenModel(modelUrl, requestOption, onProgress); | ||
} | ||
return frozen_model_1.loadFrozenModel(modelUrl, weightsManifestUrl, requestOption); | ||
// if users are using the new loadGraphModel API, the weightManifestUrl will | ||
// be omitted. We will build the url using the model URL path and default | ||
// manifest file name. | ||
if (modelUrl != null && weightsManifestUrl == null) { | ||
weightsManifestUrl = getWeightsManifestUrl(modelUrl); | ||
} | ||
return frozen_model_1.loadFrozenModel(modelUrl, weightsManifestUrl, requestOption, onProgress); | ||
} | ||
exports.loadFrozenModel = loadFrozenModel; | ||
function getWeightsManifestUrl(modelUrl) { | ||
var weightsManifestUrl; | ||
if (modelUrl != null) { | ||
var path = modelUrl.substr(0, modelUrl.lastIndexOf('/')); | ||
weightsManifestUrl = path + '/' + frozen_model_1.DEFAULT_MANIFEST_NAME; | ||
} | ||
return weightsManifestUrl; | ||
} | ||
/** | ||
* Load a graph model given a URL to the model definition. | ||
* | ||
* Example of loading MobileNetV2 from a URL and making a prediction with a | ||
* zeros input: | ||
* | ||
* ```js | ||
* const modelUrl = | ||
* 'https://storage.googleapis.com/tfjs-models/savedmodel/mobilenet_v2_1.0_224/tensorflowjs_model.pb'; | ||
* const model = await tf.loadGraphModel(modelUrl); | ||
* const zeros = tf.zeros([1, 224, 224, 3]); | ||
* model.predict(zeros).print(); | ||
* ``` | ||
* | ||
* Example of loading MobileNetV2 from a TF Hub URL and making a prediction with | ||
* a zeros input: | ||
* | ||
* ```js | ||
* const modelUrl = | ||
* 'https://tfhub.dev/google/imagenet/mobilenet_v2_140_224/classification/2'; | ||
* const model = await tf.loadGraphModel(modelUrl, {fromTFHub: true}); | ||
* const zeros = tf.zeros([1, 224, 224, 3]); | ||
* model.predict(zeros).print(); | ||
* ``` | ||
* @param modelUrl url for the model file generated by scripts/convert.py | ||
* script or a TF Hub url. | ||
* @param options options for the Request, which allows to send credentials | ||
* and custom headers. | ||
*/ | ||
/** @doc {heading: 'Models', subheading: 'Loading'} */ | ||
function loadGraphModel(modelUrl, options) { | ||
if (options != null && options.fromTFHub) { | ||
return frozen_model_1.loadTfHubModule(modelUrl, options.requestInit, options.onProgress); | ||
} | ||
var weightsManifestUrl = undefined; | ||
if (modelUrl && modelUrl.endsWith('.json')) { | ||
return frozen_model_json_1.loadFrozenModel(modelUrl, options.requestInit, options.onProgress); | ||
} | ||
// if users are using the new loadGraphModel API, the weightManifestUrl will | ||
// be omitted. We will build the url using the model URL path and default | ||
// manifest file name. | ||
if (modelUrl != null && weightsManifestUrl == null) { | ||
weightsManifestUrl = getWeightsManifestUrl(modelUrl); | ||
} | ||
return frozen_model_1.loadFrozenModel(modelUrl, weightsManifestUrl, options.requestInit, options.onProgress); | ||
} | ||
exports.loadGraphModel = loadGraphModel; | ||
//# sourceMappingURL=index.js.map |
@@ -1,3 +0,3 @@ | ||
import { OpExecutor } from './types'; | ||
import { OpExecutor } from '../types'; | ||
export declare let executeOp: OpExecutor; | ||
export declare const CATEGORY = "arithmetic"; |
@@ -23,31 +23,34 @@ "use strict"; | ||
switch (node.op) { | ||
case 'add': { | ||
case 'BiasAdd': | ||
case 'Add': { | ||
return [tfc.add(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
} | ||
case 'addN': { | ||
case 'AddN': { | ||
return [tfc.addN(utils_1.getParamValue('tensors', node, tensorMap, context))]; | ||
} | ||
case 'mod': | ||
case 'FloorMod': | ||
case 'Mod': | ||
return [tfc.mod(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
case 'mul': | ||
case 'Mul': | ||
return [tfc.mul(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
case 'div': { | ||
case 'RealDiv': | ||
case 'Div': { | ||
return [tfc.div(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
} | ||
case 'floorDiv': { | ||
case 'FloorDiv': { | ||
return [tfc.floorDiv(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
} | ||
case 'sub': { | ||
case 'Sub': { | ||
return [tfc.sub(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
} | ||
case 'minimum': { | ||
case 'Minimum': { | ||
return [tfc.minimum(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
} | ||
case 'maximum': { | ||
case 'Maximum': { | ||
return [tfc.maximum(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
} | ||
case 'pow': { | ||
case 'Pow': { | ||
return [tfc.pow(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
} | ||
case 'squaredDifference': { | ||
case 'SquaredDifference': { | ||
return [tfc.squaredDifference(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
@@ -54,0 +57,0 @@ } |
@@ -1,3 +0,3 @@ | ||
import { OpExecutor } from './types'; | ||
import { OpExecutor } from '../types'; | ||
export declare let executeOp: OpExecutor; | ||
export declare const CATEGORY = "basic_math"; |
@@ -23,83 +23,84 @@ "use strict"; | ||
switch (node.op) { | ||
case 'abs': | ||
case 'Abs': | ||
return [tfc.abs(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'acos': | ||
case 'Acos': | ||
return [tfc.acos(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'acosh': | ||
case 'Acosh': | ||
return [tfc.acosh(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'asin': | ||
case 'Asin': | ||
return [tfc.asin(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'asinh': | ||
case 'Asinh': | ||
return [tfc.asinh(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'atan': | ||
case 'Atan': | ||
return [tfc.atan(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'atan2': | ||
case 'Atan2': | ||
return [tfc.atan2(utils_1.getParamValue('x', node, tensorMap, context), utils_1.getParamValue('y', node, tensorMap, context))]; | ||
case 'atanh': | ||
case 'Atanh': | ||
return [tfc.atanh(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'ceil': | ||
case 'Ceil': | ||
return [tfc.ceil(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'cos': | ||
case 'Cos': | ||
return [tfc.cos(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'cosh': | ||
case 'Cosh': | ||
return [tfc.cosh(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'elu': | ||
case 'Elu': | ||
return [tfc.elu(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'erf': | ||
case 'Erf': | ||
return [tfc.erf(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'exp': | ||
case 'Exp': | ||
return [tfc.exp(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'expm1': { | ||
case 'Expm1': { | ||
return [tfc.expm1(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'floor': | ||
case 'Floor': | ||
return [tfc.floor(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'log': | ||
case 'Log': | ||
return [tfc.log(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'log1p': { | ||
case 'Log1p': { | ||
return [tfc.log1p(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'neg': | ||
case 'Neg': | ||
return [tfc.neg(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'reciprocal': { | ||
case 'Reciprocal': { | ||
return [tfc.reciprocal(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'relu': | ||
case 'Relu': | ||
return [tfc.relu(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'round': { | ||
case 'Round': { | ||
return [tfc.round(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'selu': | ||
case 'Selu': | ||
return [tfc.selu(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'sigmoid': | ||
case 'Sigmoid': | ||
return [tfc.sigmoid(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'sin': | ||
case 'Sin': | ||
return [tfc.sin(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'sign': { | ||
case 'Sign': { | ||
return [tfc.sign(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'sinh': { | ||
case 'Sinh': { | ||
return [tfc.sinh(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'softplus': { | ||
case 'Softplus': { | ||
return [tfc.softplus(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'sqrt': { | ||
case 'Sqrt': { | ||
return [tfc.sqrt(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'square': { | ||
case 'Square': { | ||
return [tfc.square(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'tanh': { | ||
case 'Tanh': { | ||
return [tfc.tanh(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'tan': | ||
case 'Tan': | ||
return [tfc.tan(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'clipByValue': | ||
case 'Relu6': | ||
case 'ClipByValue': | ||
return [tfc.clipByValue(utils_1.getParamValue('x', node, tensorMap, context), utils_1.getParamValue('clipValueMin', node, tensorMap, context), utils_1.getParamValue('clipValueMax', node, tensorMap, context))]; | ||
case 'rsqrt': | ||
return [tfc.div(tfc.scalar(1.0, 'float32'), tfc.sqrt(utils_1.getTensor(node.inputNames[0], tensorMap, context)))]; | ||
case 'prod': | ||
case 'Rsqrt': | ||
return [tfc.rsqrt(utils_1.getTensor(node.inputNames[0], tensorMap, context))]; | ||
case 'Prod': | ||
return [tfc.prod(utils_1.getParamValue('x', node, tensorMap, context), utils_1.getParamValue('axes', node, tensorMap, context))]; | ||
case 'leakyRelu': | ||
case 'LeakyRelu': | ||
return [tfc.leakyRelu(utils_1.getParamValue('x', node, tensorMap, context), utils_1.getParamValue('alpha', node, tensorMap, context))]; | ||
@@ -106,0 +107,0 @@ default: |
@@ -65,17 +65,17 @@ "use strict"; | ||
switch (_a) { | ||
case 'loopCond': return [3 /*break*/, 1]; | ||
case 'switch': return [3 /*break*/, 2]; | ||
case 'merge': return [3 /*break*/, 4]; | ||
case 'enter': return [3 /*break*/, 5]; | ||
case 'exit': return [3 /*break*/, 6]; | ||
case 'nextIteration': return [3 /*break*/, 7]; | ||
case 'tensorArray': return [3 /*break*/, 8]; | ||
case 'tensorArrayWrite': return [3 /*break*/, 9]; | ||
case 'tensorArrayRead': return [3 /*break*/, 10]; | ||
case 'tensorArrayGather': return [3 /*break*/, 11]; | ||
case 'tensorArrayScatter': return [3 /*break*/, 12]; | ||
case 'tensorArrayConcat': return [3 /*break*/, 13]; | ||
case 'tensorArraySplit': return [3 /*break*/, 14]; | ||
case 'tensorArraySize': return [3 /*break*/, 15]; | ||
case 'tensorArrayClose': return [3 /*break*/, 16]; | ||
case 'LoopCond': return [3 /*break*/, 1]; | ||
case 'Switch': return [3 /*break*/, 2]; | ||
case 'Merge': return [3 /*break*/, 4]; | ||
case 'Enter': return [3 /*break*/, 5]; | ||
case 'Exit': return [3 /*break*/, 6]; | ||
case 'NextIteration': return [3 /*break*/, 7]; | ||
case 'TensorArrayV3': return [3 /*break*/, 8]; | ||
case 'TensorArrayWriteV3': return [3 /*break*/, 9]; | ||
case 'TensorArrayReadV3': return [3 /*break*/, 10]; | ||
case 'TensorArrayGatherV3': return [3 /*break*/, 11]; | ||
case 'TensorArrayScatterV3': return [3 /*break*/, 12]; | ||
case 'TensorArrayConcatV3': return [3 /*break*/, 13]; | ||
case 'TensorArraySplitV3': return [3 /*break*/, 14]; | ||
case 'TensorArraySizeV3': return [3 /*break*/, 15]; | ||
case 'TensorArrayCloseV3': return [3 /*break*/, 16]; | ||
} | ||
@@ -82,0 +82,0 @@ return [3 /*break*/, 17]; |
@@ -1,3 +0,3 @@ | ||
import { OpExecutor } from './types'; | ||
import { OpExecutor } from '../types'; | ||
export declare let executeOp: OpExecutor; | ||
export declare const CATEGORY = "convolution"; |
@@ -23,3 +23,3 @@ "use strict"; | ||
switch (node.op) { | ||
case 'conv1d': { | ||
case 'Conv1D': { | ||
var stride = utils_1.getParamValue('stride', node, tensorMap, context); | ||
@@ -32,3 +32,3 @@ var pad = utils_1.getParamValue('pad', node, tensorMap, context); | ||
} | ||
case 'conv2d': { | ||
case 'Conv2D': { | ||
var stride = utils_1.getParamValue('strides', node, tensorMap, context); | ||
@@ -41,3 +41,4 @@ var pad = utils_1.getParamValue('pad', node, tensorMap, context); | ||
} | ||
case 'conv2dTranspose': { | ||
case 'Conv2DBackpropInput': | ||
case 'Conv2dTranspose': { | ||
var shape = utils_1.getParamValue('outputShape', node, tensorMap, context); | ||
@@ -48,3 +49,4 @@ var stride = utils_1.getParamValue('strides', node, tensorMap, context); | ||
} | ||
case 'depthwiseConv2d': { | ||
case 'DepthwiseConv2dNative': | ||
case 'DepthwiseConv2d': { | ||
var stride = utils_1.getParamValue('strides', node, tensorMap, context); | ||
@@ -57,3 +59,3 @@ var pad = utils_1.getParamValue('pad', node, tensorMap, context); | ||
} | ||
case 'avgPool': { | ||
case 'AvgPool': { | ||
var stride = utils_1.getParamValue('strides', node, tensorMap, context); | ||
@@ -64,3 +66,3 @@ var pad = utils_1.getParamValue('pad', node, tensorMap, context); | ||
} | ||
case 'maxPool': { | ||
case 'MaxPool': { | ||
var stride = utils_1.getParamValue('strides', node, tensorMap, context); | ||
@@ -67,0 +69,0 @@ var pad = utils_1.getParamValue('pad', node, tensorMap, context); |
@@ -1,3 +0,3 @@ | ||
import { OpExecutor } from './types'; | ||
import { OpExecutor } from '../types'; | ||
export declare let executeOp: OpExecutor; | ||
export declare const CATEGORY = "creation"; |
@@ -23,3 +23,3 @@ "use strict"; | ||
switch (node.op) { | ||
case 'fill': { | ||
case 'Fill': { | ||
var shape = utils_1.getParamValue('shape', node, tensorMap, context); | ||
@@ -30,3 +30,3 @@ var dtype = utils_1.getParamValue('dtype', node, tensorMap, context); | ||
} | ||
case 'linspace': { | ||
case 'LinSpace': { | ||
var start = utils_1.getParamValue('start', node, tensorMap, context); | ||
@@ -37,3 +37,3 @@ var stop_1 = utils_1.getParamValue('stop', node, tensorMap, context); | ||
} | ||
case 'oneHot': { | ||
case 'OneHot': { | ||
var indices = utils_1.getParamValue('indices', node, tensorMap, context); | ||
@@ -45,9 +45,9 @@ var depth = utils_1.getParamValue('depth', node, tensorMap, context); | ||
} | ||
case 'ones': { | ||
case 'Ones': { | ||
return [tfc.ones(utils_1.getParamValue('shape', node, tensorMap, context), utils_1.getParamValue('dtype', node, tensorMap, context))]; | ||
} | ||
case 'onesLike': { | ||
case 'OnesLike': { | ||
return [tfc.onesLike(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'randomUniform': { | ||
case 'RandomUniform': { | ||
return [tfc.randomUniform( | ||
@@ -57,3 +57,3 @@ // tslint:disable-next-line:no-any | ||
} | ||
case 'range': { | ||
case 'Range': { | ||
var start = utils_1.getParamValue('start', node, tensorMap, context); | ||
@@ -64,3 +64,3 @@ var stop_2 = utils_1.getParamValue('stop', node, tensorMap, context); | ||
} | ||
case 'truncatedNormal': { | ||
case 'TruncatedNormal': { | ||
var shape = utils_1.getParamValue('shape', node, tensorMap, context); | ||
@@ -72,6 +72,6 @@ var mean = utils_1.getParamValue('mean', node, tensorMap, context); | ||
} | ||
case 'zeros': { | ||
case 'Zeros': { | ||
return [tfc.zeros(utils_1.getParamValue('shape', node, tensorMap, context), utils_1.getParamValue('dtype', node, tensorMap, context))]; | ||
} | ||
case 'zerosLike': { | ||
case 'ZerosLike': { | ||
return [tfc.zerosLike(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
@@ -78,0 +78,0 @@ } |
@@ -64,5 +64,6 @@ "use strict"; | ||
switch (_a) { | ||
case 'nonMaxSuppression': return [3 /*break*/, 1]; | ||
case 'whereAsync': return [3 /*break*/, 3]; | ||
case 'setdiff1dAsync': return [3 /*break*/, 5]; | ||
case 'NonMaxSuppressionV3': return [3 /*break*/, 1]; | ||
case 'NonMaxSuppressionV2': return [3 /*break*/, 1]; | ||
case 'Where': return [3 /*break*/, 3]; | ||
case 'ListDiff': return [3 /*break*/, 5]; | ||
} | ||
@@ -69,0 +70,0 @@ return [3 /*break*/, 7]; |
@@ -1,3 +0,3 @@ | ||
import { OpExecutor } from './types'; | ||
import { OpExecutor } from '../types'; | ||
export declare let executeOp: OpExecutor; | ||
export declare const CATEGORY = "evaluation"; |
@@ -23,3 +23,3 @@ "use strict"; | ||
switch (node.op) { | ||
case 'topK': { | ||
case 'TopKV2': { | ||
var x = utils_1.getParamValue('x', node, tensorMap, context); | ||
@@ -26,0 +26,0 @@ var k = utils_1.getParamValue('k', node, tensorMap, context); |
@@ -1,3 +0,3 @@ | ||
import { OpExecutor } from './types'; | ||
import { OpExecutor } from '../types'; | ||
export declare let executeOp: OpExecutor; | ||
export declare const CATEGORY = "graph"; |
@@ -23,29 +23,31 @@ "use strict"; | ||
switch (node.op) { | ||
case 'const': { | ||
case 'Const': { | ||
return tensorMap[node.name]; | ||
} | ||
case 'placeholder': | ||
case 'PlaceholderWithDefault': | ||
var def = utils_1.getParamValue('default', node, tensorMap, context); | ||
return [utils_1.getTensor(node.name, tensorMap, context) || def]; | ||
case 'identity': | ||
case 'stopGradient': | ||
case 'fakeQuantWithMinMaxVars':// This op is currently ignored. | ||
case 'Placeholder': | ||
return [utils_1.getTensor(node.name, tensorMap, context)]; | ||
case 'Identity': | ||
case 'StopGradient': | ||
case 'FakeQuantWithMinMaxVars':// This op is currently ignored. | ||
return [ | ||
utils_1.getParamValue('x', node, tensorMap, context).clone() | ||
]; | ||
case 'snapshot': | ||
case 'Snapshot': | ||
var snapshot = utils_1.getParamValue('x', node, tensorMap, context); | ||
return [snapshot.clone()]; | ||
case 'shape': | ||
case 'Shape': | ||
return [tfc.tensor1d(utils_1.getParamValue('x', node, tensorMap, context).shape, 'int32')]; | ||
case 'shapeN': | ||
case 'ShapeN': | ||
return utils_1.getParamValue('x', node, tensorMap, context) | ||
.map(function (t) { return tfc.tensor1d(t.shape); }); | ||
case 'size': | ||
case 'Size': | ||
return [tfc.scalar(utils_1.getParamValue('x', node, tensorMap, context).size, 'int32')]; | ||
case 'rank': | ||
case 'Rank': | ||
return [tfc.scalar(utils_1.getParamValue('x', node, tensorMap, context).rank, 'int32')]; | ||
case 'noop': | ||
case 'NoOp': | ||
return []; | ||
case 'print': | ||
case 'Print': | ||
var input = utils_1.getParamValue('x', node, tensorMap, context); | ||
@@ -59,3 +61,3 @@ var data = utils_1.getParamValue('data', node, tensorMap, context); | ||
for (var i = 0; i < data.length; i++) { | ||
console.log(Array.prototype.slice.call(data[0].dataSync()).slice(0, summarize)); | ||
console.log(Array.prototype.slice.call(data[i].dataSync()).slice(0, summarize)); | ||
} | ||
@@ -62,0 +64,0 @@ return [input]; |
@@ -1,3 +0,3 @@ | ||
import { OpExecutor } from './types'; | ||
import { OpExecutor } from '../types'; | ||
export declare let executeOp: OpExecutor; | ||
export declare const CATEGORY = "image"; |
@@ -23,3 +23,3 @@ "use strict"; | ||
switch (node.op) { | ||
case 'resizeBilinear': { | ||
case 'ResizeBilinear': { | ||
var images = utils_1.getParamValue('images', node, tensorMap, context); | ||
@@ -30,3 +30,3 @@ var size = utils_1.getParamValue('size', node, tensorMap, context); | ||
} | ||
case 'resizeNearestNeighbor': { | ||
case 'ResizeNearestNeighbor': { | ||
var images = utils_1.getParamValue('images', node, tensorMap, context); | ||
@@ -37,3 +37,3 @@ var size = utils_1.getParamValue('size', node, tensorMap, context); | ||
} | ||
case 'cropAndResize': { | ||
case 'CropAndResize': { | ||
var image = utils_1.getParamValue('image', node, tensorMap, context); | ||
@@ -40,0 +40,0 @@ var boxes = utils_1.getParamValue('boxes', node, tensorMap, context); |
@@ -1,3 +0,3 @@ | ||
import { OpExecutor } from './types'; | ||
import { OpExecutor } from '../types'; | ||
export declare let executeOp: OpExecutor; | ||
export declare const CATEGORY = "logical"; |
@@ -23,30 +23,30 @@ "use strict"; | ||
switch (node.op) { | ||
case 'equal': { | ||
case 'Equal': { | ||
return [tfc.equal(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
} | ||
case 'notEqual': { | ||
case 'NotEqual': { | ||
return [tfc.notEqual(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
} | ||
case 'greater': { | ||
case 'Greater': { | ||
return [tfc.greater(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
} | ||
case 'greaterEqual': { | ||
case 'GreaterEqual': { | ||
return [tfc.greaterEqual(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
} | ||
case 'less': { | ||
case 'Less': { | ||
return [tfc.less(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
} | ||
case 'lessEqual': { | ||
case 'LessEqual': { | ||
return [tfc.lessEqual(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
} | ||
case 'logicalAnd': { | ||
case 'LogicalAnd': { | ||
return [tfc.logicalAnd(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
} | ||
case 'logicalNot': { | ||
case 'LogicalNot': { | ||
return [tfc.logicalNot(utils_1.getParamValue('a', node, tensorMap, context))]; | ||
} | ||
case 'logicalOr': { | ||
case 'LogicalOr': { | ||
return [tfc.logicalOr(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
} | ||
case 'where': { | ||
case 'Select': { | ||
return [tfc.where(utils_1.getParamValue('condition', node, tensorMap, context), utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context))]; | ||
@@ -53,0 +53,0 @@ } |
@@ -1,3 +0,3 @@ | ||
import { OpExecutor } from './types'; | ||
import { OpExecutor } from '../types'; | ||
export declare let executeOp: OpExecutor; | ||
export declare const CATEGORY = "matrices"; |
@@ -23,5 +23,6 @@ "use strict"; | ||
switch (node.op) { | ||
case 'matMul': | ||
case 'BatchMatMul': | ||
case 'MatMul': | ||
return [tfc.matMul(utils_1.getParamValue('a', node, tensorMap, context), utils_1.getParamValue('b', node, tensorMap, context), utils_1.getParamValue('transposeA', node, tensorMap, context), utils_1.getParamValue('transposeB', node, tensorMap, context))]; | ||
case 'transpose': | ||
case 'Transpose': | ||
return [tfc.transpose(utils_1.getParamValue('x', node, tensorMap, context), utils_1.getParamValue('perm', node, tensorMap, context))]; | ||
@@ -28,0 +29,0 @@ default: |
@@ -1,3 +0,3 @@ | ||
import { OpExecutor } from './types'; | ||
import { OpExecutor } from '../types'; | ||
export declare let executeOp: OpExecutor; | ||
export declare const CATEGORY = "normalization"; |
@@ -23,15 +23,16 @@ "use strict"; | ||
switch (node.op) { | ||
case 'batchNormalization': { | ||
case 'FusedBatchNorm': | ||
case 'FusedBatchNormV2': { | ||
return [tfc.batchNorm(utils_1.getParamValue('x', node, tensorMap, context), utils_1.getParamValue('mean', node, tensorMap, context), utils_1.getParamValue('variance', node, tensorMap, context), utils_1.getParamValue('offset', node, tensorMap, context), utils_1.getParamValue('scale', node, tensorMap, context), utils_1.getParamValue('epsilon', node, tensorMap, context))]; | ||
} | ||
case 'localResponseNormalization': { | ||
case 'LRN': { | ||
return [tfc.localResponseNormalization(utils_1.getParamValue('x', node, tensorMap, context), utils_1.getParamValue('radius', node, tensorMap, context), utils_1.getParamValue('bias', node, tensorMap, context), utils_1.getParamValue('alpha', node, tensorMap, context), utils_1.getParamValue('beta', node, tensorMap, context))]; | ||
} | ||
case 'softmax': { | ||
case 'Softmax': { | ||
return [tfc.softmax(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'logSoftmax': { | ||
case 'LogSoftmax': { | ||
return [tfc.logSoftmax(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'sparseToDense': { | ||
case 'SparseToDense': { | ||
return [tfc.sparseToDense(utils_1.getParamValue('sparseIndices', node, tensorMap, context), utils_1.getParamValue('outputShape', node, tensorMap, context), utils_1.getParamValue('sparseValues', node, tensorMap, context), utils_1.getParamValue('defaultValue', node, tensorMap, context))]; | ||
@@ -38,0 +39,0 @@ } |
@@ -1,3 +0,3 @@ | ||
import { OpExecutor } from './types'; | ||
import { OpExecutor } from '../types'; | ||
export declare let executeOp: OpExecutor; | ||
export declare const CATEGORY = "reduction"; |
@@ -23,3 +23,3 @@ "use strict"; | ||
switch (node.op) { | ||
case 'max': { | ||
case 'Max': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
@@ -29,3 +29,3 @@ var keepDims = utils_1.getParamValue('keepDims', node, tensorMap, context); | ||
} | ||
case 'mean': { | ||
case 'Mean': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
@@ -35,3 +35,3 @@ var keepDims = utils_1.getParamValue('keepDims', node, tensorMap, context); | ||
} | ||
case 'min': { | ||
case 'Min': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
@@ -41,3 +41,3 @@ var keepDims = utils_1.getParamValue('keepDims', node, tensorMap, context); | ||
} | ||
case 'sum': { | ||
case 'Sum': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
@@ -47,3 +47,3 @@ var keepDims = utils_1.getParamValue('keepDims', node, tensorMap, context); | ||
} | ||
case 'all': { | ||
case 'All': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
@@ -53,3 +53,3 @@ var keepDims = utils_1.getParamValue('keepDims', node, tensorMap, context); | ||
} | ||
case 'any': { | ||
case 'Any': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
@@ -59,11 +59,11 @@ var keepDims = utils_1.getParamValue('keepDims', node, tensorMap, context); | ||
} | ||
case 'argMax': { | ||
case 'ArgMax': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
return [tfc.argMax(utils_1.getParamValue('x', node, tensorMap, context), axis)]; | ||
} | ||
case 'argMin': { | ||
case 'ArgMin': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
return [tfc.argMin(utils_1.getParamValue('x', node, tensorMap, context), axis)]; | ||
} | ||
case 'prod': { | ||
case 'Prod': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
@@ -70,0 +70,0 @@ var keepDims = utils_1.getParamValue('keepDims', node, tensorMap, context); |
@@ -1,3 +0,3 @@ | ||
import { OpExecutor } from './types'; | ||
import { OpExecutor } from '../types'; | ||
export declare let executeOp: OpExecutor; | ||
export declare const CATEGORY = "slice_join"; |
@@ -23,3 +23,4 @@ "use strict"; | ||
switch (node.op) { | ||
case 'concat': { | ||
case 'ConcatV2': | ||
case 'Concat': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
@@ -29,3 +30,4 @@ var inputs = utils_1.getParamValue('tensors', node, tensorMap, context); | ||
} | ||
case 'gather': { | ||
case 'GatherV2': | ||
case 'Gather': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
@@ -36,3 +38,4 @@ var input = utils_1.getParamValue('x', node, tensorMap, context); | ||
} | ||
case 'reverse': { | ||
case 'ReverseV2': | ||
case 'Reverse': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
@@ -42,3 +45,3 @@ var input = utils_1.getParamValue('x', node, tensorMap, context); | ||
} | ||
case 'slice': { | ||
case 'Slice': { | ||
// tslint:disable-next-line:no-any | ||
@@ -50,3 +53,3 @@ var begin = utils_1.getParamValue('begin', node, tensorMap, context); | ||
} | ||
case 'stridedSlice': { | ||
case 'StridedSlice': { | ||
var begin = utils_1.getParamValue('begin', node, tensorMap, context); | ||
@@ -70,3 +73,3 @@ var end = utils_1.getParamValue('end', node, tensorMap, context); | ||
} | ||
case 'stack': { | ||
case 'Pack': { | ||
return tfc.tidy(function () { | ||
@@ -89,3 +92,3 @@ var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
} | ||
case 'unstack': { | ||
case 'Unpack': { | ||
return tfc.tidy(function () { | ||
@@ -97,7 +100,8 @@ var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
} | ||
case 'tile': { | ||
case 'Tile': { | ||
var reps = utils_1.getParamValue('reps', node, tensorMap, context); | ||
return [tfc.tile(utils_1.getParamValue('x', node, tensorMap, context), reps)]; | ||
} | ||
case 'split': { | ||
case 'Split': | ||
case 'SplitV': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
@@ -107,3 +111,3 @@ var numOrSizeSplits = utils_1.getParamValue('numOrSizeSplits', node, tensorMap, context); | ||
} | ||
case 'scatterNd': { | ||
case 'ScatterNd': { | ||
var indices = utils_1.getParamValue('indices', node, tensorMap, context); | ||
@@ -114,3 +118,3 @@ var values = utils_1.getParamValue('values', node, tensorMap, context); | ||
} | ||
case 'gatherNd': { | ||
case 'GatherNd': { | ||
var x = utils_1.getParamValue('x', node, tensorMap, context); | ||
@@ -120,3 +124,3 @@ var indices = utils_1.getParamValue('indices', node, tensorMap, context); | ||
} | ||
case 'sparseToDense': { | ||
case 'SparseToDense': { | ||
var indices = utils_1.getParamValue('sparseIndices', node, tensorMap, context); | ||
@@ -123,0 +127,0 @@ var shape = utils_1.getParamValue('outputShape', node, tensorMap, context); |
@@ -1,3 +0,3 @@ | ||
import { OpExecutor } from './types'; | ||
import { OpExecutor } from '../types'; | ||
export declare let executeOp: OpExecutor; | ||
export declare const CATEGORY = "spectral"; |
@@ -23,12 +23,12 @@ "use strict"; | ||
switch (node.op) { | ||
case 'fft': { | ||
case 'FFT': { | ||
return [tfc.fft(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'ifft': { | ||
case 'IFFT': { | ||
return [tfc.ifft(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'rfft': { | ||
case 'RFFT': { | ||
return [tfc.rfft(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
} | ||
case 'irfft': { | ||
case 'IRFFT': { | ||
return [tfc.irfft(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
@@ -35,0 +35,0 @@ } |
@@ -17,6 +17,6 @@ /** | ||
*/ | ||
import { OpMapper, ParamValue } from '../types'; | ||
import { InputParamValue, OpMapper, ParamValue } from '../types'; | ||
import { Node } from '../types'; | ||
export declare function createNumberAttr(value: number): ParamValue; | ||
export declare function createNumberAttrFromIndex(inputIndex: number): ParamValue; | ||
export declare function createNumberAttrFromIndex(inputIndex: number): InputParamValue; | ||
export declare function createStrAttr(str: string): ParamValue; | ||
@@ -26,6 +26,6 @@ export declare function createBoolAttr(value: boolean): ParamValue; | ||
export declare function createNumericArrayAttr(value: number[]): ParamValue; | ||
export declare function createNumericArrayAttrFromIndex(inputIndex: number): ParamValue; | ||
export declare function createTensorAttr(index: number): ParamValue; | ||
export declare function createTensorsAttr(index: number, paramLength: number): ParamValue; | ||
export declare function createNumericArrayAttrFromIndex(inputIndex: number): InputParamValue; | ||
export declare function createTensorAttr(index: number): InputParamValue; | ||
export declare function createTensorsAttr(index: number, paramLength: number): InputParamValue; | ||
export declare function createDtypeAttr(dtype: string): ParamValue; | ||
export declare function validateParam(node: Node, opMappers: OpMapper[], tfOpName?: string): boolean; |
@@ -8,3 +8,3 @@ "use strict"; | ||
function createNumberAttrFromIndex(inputIndex) { | ||
return { inputIndex: inputIndex, type: 'number' }; | ||
return { inputIndexStart: inputIndex, type: 'number' }; | ||
} | ||
@@ -29,11 +29,11 @@ exports.createNumberAttrFromIndex = createNumberAttrFromIndex; | ||
function createNumericArrayAttrFromIndex(inputIndex) { | ||
return { inputIndex: inputIndex, type: 'number[]' }; | ||
return { inputIndexStart: inputIndex, type: 'number[]' }; | ||
} | ||
exports.createNumericArrayAttrFromIndex = createNumericArrayAttrFromIndex; | ||
function createTensorAttr(index) { | ||
return { inputIndex: index, type: 'tensor' }; | ||
return { inputIndexStart: index, type: 'tensor' }; | ||
} | ||
exports.createTensorAttr = createTensorAttr; | ||
function createTensorsAttr(index, paramLength) { | ||
return { inputIndex: index, inputParamLength: paramLength, type: 'tensors' }; | ||
return { inputIndexStart: index, inputIndexEnd: paramLength, type: 'tensors' }; | ||
} | ||
@@ -48,11 +48,16 @@ exports.createTensorsAttr = createTensorsAttr; | ||
opMappers.find(function (mapper) { return mapper.tfOpName === tfOpName; }) : | ||
opMappers.find(function (mapper) { return mapper.dlOpName === node.op; }); | ||
return Object.keys(node.params).every(function (key) { | ||
var value = node.params[key]; | ||
var def = opMapper.params.find(function (param) { return param.dlParamName === key; }); | ||
opMappers.find(function (mapper) { return mapper.tfOpName === node.op; }); | ||
return Object.keys(node.inputParams).every(function (key) { | ||
var value = node.inputParams[key]; | ||
var def = opMapper.inputs.find(function (param) { return param.name === key; }); | ||
return def && def.type === value.type && | ||
def.tfInputIndex === value.inputIndex; | ||
}); | ||
def.start === value.inputIndexStart && def.end === value.inputIndexEnd; | ||
}) && | ||
Object.keys(node.attrParams).every(function (key) { | ||
var value = node.attrParams[key]; | ||
var def = opMapper.attrs.find(function (param) { return param.name === key; }); | ||
return def && def.type === value.type; | ||
}); | ||
} | ||
exports.validateParam = validateParam; | ||
//# sourceMappingURL=test_helper.js.map |
@@ -1,3 +0,3 @@ | ||
import { OpExecutor } from './types'; | ||
import { OpExecutor } from '../types'; | ||
export declare let executeOp: OpExecutor; | ||
export declare const CATEGORY = "transformation"; |
@@ -23,20 +23,21 @@ "use strict"; | ||
switch (node.op) { | ||
case 'cast': { | ||
case 'Cast': { | ||
return [tfc.cast(utils_1.getParamValue('x', node, tensorMap, context), utils_1.getParamValue('dtype', node, tensorMap, context))]; | ||
} | ||
case 'expandDims': { | ||
case 'ExpandDims': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
return [tfc.expandDims(utils_1.getParamValue('x', node, tensorMap, context), axis)]; | ||
} | ||
case 'squeeze': { | ||
case 'Squeeze': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
return [tfc.squeeze(utils_1.getParamValue('x', node, tensorMap, context), axis)]; | ||
} | ||
case 'reshape': { | ||
case 'Reshape': { | ||
return [tfc.reshape(utils_1.getParamValue('x', node, tensorMap, context), utils_1.getParamValue('shape', node, tensorMap, context))]; | ||
} | ||
case 'pad': { | ||
case 'PadV2': | ||
case 'Pad': { | ||
return [tfc.pad(utils_1.getParamValue('x', node, tensorMap, context), utils_1.split(utils_1.getParamValue('padding', node, tensorMap, context), 2), utils_1.getParamValue('constantValue', node, tensorMap, context))]; | ||
} | ||
case 'spaceToBatchND': { | ||
case 'SpaceToBatchND': { | ||
var blockShape = utils_1.getParamValue('blockShape', node, tensorMap, context); | ||
@@ -46,3 +47,3 @@ var paddings = utils_1.split(utils_1.getParamValue('paddings', node, tensorMap, context), 2); | ||
} | ||
case 'batchToSpaceND': { | ||
case 'BatchToSpaceND': { | ||
var blockShape = utils_1.getParamValue('blockShape', node, tensorMap, context); | ||
@@ -52,3 +53,3 @@ var crops = utils_1.split(utils_1.getParamValue('crops', node, tensorMap, context), 2); | ||
} | ||
case 'depthToSpace': { | ||
case 'DepthToSpace': { | ||
var blockSize = utils_1.getParamValue('blockSize', node, tensorMap, context); | ||
@@ -55,0 +56,0 @@ var dataFormat = utils_1.getParamValue('dataFormat', node, tensorMap, context).toUpperCase(); |
@@ -20,20 +20,22 @@ "use strict"; | ||
function getParamValue(paramName, node, tensorMap, context) { | ||
var param = node.params[paramName]; | ||
if (param && param.inputIndex !== undefined) { | ||
if (param.type === 'tensor') { | ||
return getTensor(node.inputNames[param.inputIndex], tensorMap, context); | ||
var inputParam = node.inputParams[paramName]; | ||
if (inputParam && inputParam.inputIndexStart !== undefined) { | ||
var start = inputParam.inputIndexStart; | ||
var end = inputParam.inputIndexEnd === 0 ? | ||
undefined : | ||
(inputParam.inputIndexEnd === undefined ? start + 1 : | ||
inputParam.inputIndexEnd); | ||
if (inputParam.type === 'tensor') { | ||
return getTensor(node.inputNames[inputParam.inputIndexStart], tensorMap, context); | ||
} | ||
if (param.type === 'tensors') { | ||
var inputs = param.inputIndex === 0 ? | ||
(param.inputParamLength === 0 ? | ||
node.inputNames : | ||
node.inputNames.slice(param.inputIndex, -param.inputParamLength)) : | ||
node.inputNames.splice(param.inputIndex); | ||
if (inputParam.type === 'tensors') { | ||
var inputs = node.inputNames.slice(start, end); | ||
return inputs.map(function (name) { return getTensor(name, tensorMap, context); }); | ||
} | ||
var data = Array.prototype.slice.call(getTensor(node.inputNames.slice(param.inputIndex)[0], tensorMap, context) | ||
var data = Array.prototype.slice.call(getTensor(node.inputNames.slice(start)[0], tensorMap, context) | ||
.dataSync()); | ||
return param.type === 'number' ? data[0] : data; | ||
return inputParam.type === 'number' ? data[0] : data; | ||
} | ||
return param && param.value; | ||
var attrParam = node.attrParams[paramName]; | ||
return attrParam && attrParam.value; | ||
} | ||
@@ -40,0 +42,0 @@ exports.getParamValue = getParamValue; |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,29 +18,2 @@ * @license | ||
*/ | ||
export declare const json: ({ | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
})[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': { | ||
'tfInputIndex': number; | ||
'tfInputParamLength': number; | ||
'dlParamName': string; | ||
'type': string; | ||
}[]; | ||
})[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,16 +19,12 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [ | ||
{ | ||
'tfOpName': 'Add', | ||
'dlOpName': 'add', | ||
'category': 'arithmetic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -37,23 +34,14 @@ }, | ||
'tfOpName': 'AddN', | ||
'dlOpName': 'addN', | ||
'category': 'arithmetic', | ||
'params': [{ | ||
'tfInputIndex': 0, | ||
'tfInputParamLength': 0, | ||
'dlParamName': 'tensors', | ||
'type': 'tensors' | ||
}] | ||
'inputs': [{ 'start': 0, 'end': 0, 'name': 'tensors', 'type': 'tensors' }] | ||
}, | ||
{ | ||
'tfOpName': 'BiasAdd', | ||
'dlOpName': 'add', | ||
'category': 'arithmetic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -63,12 +51,9 @@ }, | ||
'tfOpName': 'Sub', | ||
'dlOpName': 'sub', | ||
'category': 'arithmetic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -78,12 +63,9 @@ }, | ||
'tfOpName': 'RealDiv', | ||
'dlOpName': 'div', | ||
'category': 'arithmetic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -93,12 +75,9 @@ }, | ||
'tfOpName': 'Div', | ||
'dlOpName': 'div', | ||
'category': 'arithmetic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -108,12 +87,9 @@ }, | ||
'tfOpName': 'FloorDiv', | ||
'dlOpName': 'floorDiv', | ||
'category': 'arithmetic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -123,12 +99,9 @@ }, | ||
'tfOpName': 'Mul', | ||
'dlOpName': 'mul', | ||
'category': 'arithmetic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -138,7 +111,6 @@ }, | ||
'tfOpName': 'Maximum', | ||
'dlOpName': 'maximum', | ||
'category': 'arithmetic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' } | ||
] | ||
@@ -148,7 +120,6 @@ }, | ||
'tfOpName': 'Minimum', | ||
'dlOpName': 'minimum', | ||
'category': 'arithmetic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' } | ||
] | ||
@@ -158,12 +129,9 @@ }, | ||
'tfOpName': 'Pow', | ||
'dlOpName': 'pow', | ||
'category': 'arithmetic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -173,12 +141,9 @@ }, | ||
'tfOpName': 'SquaredDifference', | ||
'dlOpName': 'squaredDifference', | ||
'category': 'arithmetic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -188,12 +153,9 @@ }, | ||
'tfOpName': 'Mod', | ||
'dlOpName': 'mod', | ||
'category': 'arithmetic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -203,15 +165,15 @@ }, | ||
'tfOpName': 'FloorMod', | ||
'dlOpName': 'mod', | ||
'category': 'arithmetic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [{ | ||
'tfName': 'T', | ||
'name': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
] | ||
}] | ||
} | ||
]; | ||
//# sourceMappingURL=arithmetic.js.map |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,69 +18,2 @@ * @license | ||
*/ | ||
export declare const json: ({ | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
tfInputIndex?: undefined; | ||
})[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
notSupported?: undefined; | ||
defaultValue?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
defaultValue?: undefined; | ||
} | { | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
tfInputIndex?: undefined; | ||
tfParamName?: undefined; | ||
notSupported?: undefined; | ||
})[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
defaultValue?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
tfInputIndex?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
defaultValue?: undefined; | ||
})[]; | ||
})[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,15 +19,11 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [ | ||
{ | ||
'tfOpName': 'Abs', | ||
'dlOpName': 'abs', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -36,11 +33,8 @@ }, | ||
'tfOpName': 'Acos', | ||
'dlOpName': 'acos', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -50,11 +44,8 @@ }, | ||
'tfOpName': 'Asin', | ||
'dlOpName': 'asin', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -64,11 +55,8 @@ }, | ||
'tfOpName': 'Atan', | ||
'dlOpName': 'atan', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -78,12 +66,9 @@ }, | ||
'tfOpName': 'Atan2', | ||
'dlOpName': 'atan2', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'y', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'y', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -93,11 +78,8 @@ }, | ||
'tfOpName': 'Ceil', | ||
'dlOpName': 'ceil', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -107,15 +89,9 @@ }, | ||
'tfOpName': 'ClipByValue', | ||
'dlOpName': 'clipByValue', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'clip_value_min', | ||
'dlParamName': 'clipValueMin', | ||
'type': 'number' | ||
}, | ||
{ | ||
'tfParamName': 'clip_value_max', | ||
'dlParamName': 'clipValueMax', | ||
'type': 'number' | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'clip_value_min', 'name': 'clipValueMin', 'type': 'number' }, | ||
{ 'tfName': 'clip_value_max', 'name': 'clipValueMax', 'type': 'number' } | ||
] | ||
@@ -125,11 +101,8 @@ }, | ||
'tfOpName': 'Cos', | ||
'dlOpName': 'cos', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -139,11 +112,8 @@ }, | ||
'tfOpName': 'Cosh', | ||
'dlOpName': 'cosh', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -153,11 +123,8 @@ }, | ||
'tfOpName': 'Elu', | ||
'dlOpName': 'elu', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -167,11 +134,8 @@ }, | ||
'tfOpName': 'Exp', | ||
'dlOpName': 'exp', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -181,11 +145,8 @@ }, | ||
'tfOpName': 'Floor', | ||
'dlOpName': 'floor', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -195,11 +156,8 @@ }, | ||
'tfOpName': 'Log', | ||
'dlOpName': 'log', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -209,11 +167,8 @@ }, | ||
'tfOpName': 'Neg', | ||
'dlOpName': 'neg', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -223,11 +178,8 @@ }, | ||
'tfOpName': 'Relu', | ||
'dlOpName': 'relu', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -237,13 +189,19 @@ }, | ||
'tfOpName': 'Relu6', | ||
'dlOpName': 'clipByValue', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true }, { | ||
'tfName': 'clipValueMin', | ||
'name': 'clipValueMin', | ||
'type': 'number', | ||
'defaultValue': 0 | ||
}, | ||
{ 'dlParamName': 'clipValueMin', 'type': 'number', 'defaultValue': 0 }, | ||
{ 'dlParamName': 'clipValueMax', 'type': 'number', 'defaultValue': 6 } | ||
{ | ||
'tfName': 'clipValueMax', | ||
'name': 'clipValueMax', | ||
'type': 'number', | ||
'defaultValue': 6 | ||
} | ||
] | ||
@@ -253,11 +211,8 @@ }, | ||
'tfOpName': 'Selu', | ||
'dlOpName': 'selu', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -267,11 +222,8 @@ }, | ||
'tfOpName': 'Sigmoid', | ||
'dlOpName': 'sigmoid', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -281,11 +233,8 @@ }, | ||
'tfOpName': 'Sin', | ||
'dlOpName': 'sin', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -295,11 +244,8 @@ }, | ||
'tfOpName': 'Sinh', | ||
'dlOpName': 'sinh', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -309,11 +255,8 @@ }, | ||
'tfOpName': 'Sqrt', | ||
'dlOpName': 'sqrt', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -323,11 +266,8 @@ }, | ||
'tfOpName': 'Rsqrt', | ||
'dlOpName': 'rsqrt', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -337,11 +277,8 @@ }, | ||
'tfOpName': 'Square', | ||
'dlOpName': 'square', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -351,11 +288,8 @@ }, | ||
'tfOpName': 'Tan', | ||
'dlOpName': 'tan', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -365,11 +299,8 @@ }, | ||
'tfOpName': 'Tanh', | ||
'dlOpName': 'tanh', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -379,11 +310,8 @@ }, | ||
'tfOpName': 'Sign', | ||
'dlOpName': 'sign', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -393,11 +321,8 @@ }, | ||
'tfOpName': 'Round', | ||
'dlOpName': 'round', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -407,11 +332,8 @@ }, | ||
'tfOpName': 'Expm1', | ||
'dlOpName': 'expm1', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -421,11 +343,8 @@ }, | ||
'tfOpName': 'Log1p', | ||
'dlOpName': 'log1p', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -435,37 +354,18 @@ }, | ||
'tfOpName': 'Reciprocal', | ||
'dlOpName': 'reciprocal', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
}, | ||
{ | ||
'tfOpName': 'Reciprocal', | ||
'dlOpName': 'reciprocal', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
] | ||
}, | ||
{ | ||
'tfOpName': 'Softplus', | ||
'dlOpName': 'softplus', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -475,11 +375,8 @@ }, | ||
'tfOpName': 'Asinh', | ||
'dlOpName': 'asinh', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -489,11 +386,8 @@ }, | ||
'tfOpName': 'Acosh', | ||
'dlOpName': 'acosh', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -503,11 +397,8 @@ }, | ||
'tfOpName': 'Atanh', | ||
'dlOpName': 'atanh', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -517,11 +408,8 @@ }, | ||
'tfOpName': 'Erf', | ||
'dlOpName': 'erf', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -531,18 +419,15 @@ }, | ||
'tfOpName': 'Prod', | ||
'dlOpName': 'prod', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'axes', 'type': 'number[]' }, { | ||
'tfParamName': 'keep_dims', | ||
'dlParamName': 'keepDims', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'axes', 'type': 'number[]' }, | ||
], | ||
'attrs': [ | ||
{ | ||
'tfName': 'keep_dims', | ||
'name': 'keepDims', | ||
'type': 'bool', | ||
'notSupported': true | ||
}, | ||
{ | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -552,8 +437,10 @@ }, | ||
'tfOpName': 'LeakyRelu', | ||
'dlOpName': 'leakyRelu', | ||
'category': 'basic_math', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'alpha', | ||
'dlParamName': 'alpha', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ | ||
'tfName': 'alpha', | ||
'name': 'alpha', | ||
'type': 'number', | ||
@@ -563,4 +450,4 @@ 'defaultValue': 0.2 | ||
{ | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'tfName': 'T', | ||
'name': 'dtype', | ||
'type': 'dtype', | ||
@@ -567,0 +454,0 @@ 'notSupported': true |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,35 +18,2 @@ * @license | ||
*/ | ||
export declare const json: ({ | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': { | ||
'tfInputIndex': number; | ||
'tfInputParamLength': number; | ||
'dlParamName': string; | ||
'type': string; | ||
}[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
tfInputIndex?: undefined; | ||
notSupported?: undefined; | ||
})[]; | ||
})[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,17 +19,14 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [ | ||
{ | ||
'tfOpName': 'LoopCond', | ||
'dlOpName': 'loopCond', | ||
'category': 'control', | ||
'params': [{ 'tfInputIndex': 0, 'dlParamName': 'pred', 'type': 'tensor' }] | ||
'inputs': [{ 'start': 0, 'name': 'pred', 'type': 'tensor' }] | ||
}, | ||
{ | ||
'tfOpName': 'Switch', | ||
'dlOpName': 'switch', | ||
'category': 'control', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'data', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'pred', 'type': 'tensor' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'data', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'pred', 'type': 'tensor' } | ||
] | ||
@@ -38,32 +36,15 @@ }, | ||
'tfOpName': 'Merge', | ||
'dlOpName': 'merge', | ||
'category': 'control', | ||
'params': [{ | ||
'tfInputIndex': 0, | ||
'tfInputParamLength': 0, | ||
'dlParamName': 'tensors', | ||
'type': 'tensors' | ||
}] | ||
'inputs': [{ 'start': 0, 'end': 0, 'name': 'tensors', 'type': 'tensors' }] | ||
}, | ||
{ | ||
'tfOpName': 'Enter', | ||
'dlOpName': 'enter', | ||
'category': 'control', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'tensor', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
}, | ||
{ | ||
'tfParamName': 'frame_name', | ||
'dlParamName': 'frameName', | ||
'type': 'string' | ||
}, | ||
{ | ||
'tfParamName': 'is_constant', | ||
'dlParamName': 'isConstant', | ||
'type': 'bool' | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'tensor', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true }, | ||
{ 'tfName': 'frame_name', 'name': 'frameName', 'type': 'string' }, | ||
{ 'tfName': 'is_constant', 'name': 'isConstant', 'type': 'bool' } | ||
] | ||
@@ -73,11 +54,8 @@ }, | ||
'tfOpName': 'Exit', | ||
'dlOpName': 'exit', | ||
'category': 'control', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'tensor', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'tensor', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -87,11 +65,8 @@ }, | ||
'tfOpName': 'NextIteration', | ||
'dlOpName': 'nextIteration', | ||
'category': 'control', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'tensor', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'tensor', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -101,31 +76,17 @@ }, | ||
'tfOpName': 'TensorArrayV3', | ||
'dlOpName': 'tensorArray', | ||
'category': 'control', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'size', 'type': 'number' }, | ||
{ 'tfParamName': 'dtype', 'dlParamName': 'dtype', 'type': 'dtype' }, { | ||
'tfParamName': 'element_shape', | ||
'dlParamName': 'elementShape', | ||
'type': 'shape' | ||
}, | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'size', 'type': 'number' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'dtype', 'name': 'dtype', 'type': 'dtype' }, | ||
{ 'tfName': 'element_shape', 'name': 'elementShape', 'type': 'shape' }, | ||
{ 'tfName': 'dynamic_size', 'name': 'dynamicSize', 'type': 'bool' }, | ||
{ 'tfName': 'clear_after_read', 'name': 'clearAfterRead', 'type': 'bool' }, | ||
{ | ||
'tfParamName': 'dynamic_size', | ||
'dlParamName': 'dynamicSize', | ||
'tfName': 'identical_element_shapes', | ||
'name': 'identicalElementShapes', | ||
'type': 'bool' | ||
}, | ||
{ | ||
'tfParamName': 'clear_after_read', | ||
'dlParamName': 'clearAfterRead', | ||
'type': 'bool' | ||
}, | ||
{ | ||
'tfParamName': 'identical_element_shapes', | ||
'dlParamName': 'identicalElementShapes', | ||
'type': 'bool' | ||
}, | ||
{ | ||
'tfParamName': 'tensor_array_name', | ||
'dlParamName': 'name', | ||
'type': 'string' | ||
} | ||
{ 'tfName': 'tensor_array_name', 'name': 'name', 'type': 'string' } | ||
] | ||
@@ -135,14 +96,11 @@ }, | ||
'tfOpName': 'TensorArrayWriteV3', | ||
'dlOpName': 'tensorArrayWrite', | ||
'category': 'control', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'tensorArrayId', 'type': 'number' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'index', 'type': 'number' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'tensor', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 3, 'dlParamName': 'flowIn', 'type': 'number' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'tensorArrayId', 'type': 'number' }, | ||
{ 'start': 1, 'name': 'index', 'type': 'number' }, | ||
{ 'start': 2, 'name': 'tensor', 'type': 'tensor' }, | ||
{ 'start': 3, 'name': 'flowIn', 'type': 'number' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -152,28 +110,26 @@ }, | ||
'tfOpName': 'TensorArrayReadV3', | ||
'dlOpName': 'tensorArrayRead', | ||
'category': 'control', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'tensorArrayId', 'type': 'number' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'index', 'type': 'number' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'flowIn', 'type': 'number' }, { | ||
'tfParamName': 'dtype', | ||
'dlParamName': 'dtype', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'tensorArrayId', 'type': 'number' }, | ||
{ 'start': 1, 'name': 'index', 'type': 'number' }, | ||
{ 'start': 2, 'name': 'flowIn', 'type': 'number' }, | ||
], | ||
'attrs': [{ | ||
'tfName': 'dtype', | ||
'name': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
] | ||
}] | ||
}, | ||
{ | ||
'tfOpName': 'TensorArrayGatherV3', | ||
'dlOpName': 'tensorArrayGather', | ||
'category': 'control', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'tensorArrayId', 'type': 'number' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'indices', 'type': 'number[]' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'flowIn', 'type': 'number' }, | ||
{ 'tfParamName': 'dtype', 'dlParamName': 'dtype', 'type': 'dtype' }, { | ||
'tfParamName': 'element_shape', | ||
'dlParamName': 'elementShape', | ||
'type': 'shape' | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'tensorArrayId', 'type': 'number' }, | ||
{ 'start': 1, 'name': 'indices', 'type': 'number[]' }, | ||
{ 'start': 2, 'name': 'flowIn', 'type': 'number' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'dtype', 'name': 'dtype', 'type': 'dtype' }, | ||
{ 'tfName': 'element_shape', 'name': 'elementShape', 'type': 'shape' } | ||
] | ||
@@ -183,22 +139,22 @@ }, | ||
'tfOpName': 'TensorArrayScatterV3', | ||
'dlOpName': 'tensorArrayScatter', | ||
'category': 'control', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'tensorArrayId', 'type': 'number' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'indices', 'type': 'number[]' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'tensor', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 3, 'dlParamName': 'flowIn', 'type': 'number' }, | ||
{ 'tfParamName': 'T', 'dlParamName': 'dtype', 'type': 'dtype' } | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'tensorArrayId', 'type': 'number' }, | ||
{ 'start': 1, 'name': 'indices', 'type': 'number[]' }, | ||
{ 'start': 2, 'name': 'tensor', 'type': 'tensor' }, | ||
{ 'start': 3, 'name': 'flowIn', 'type': 'number' }, | ||
], | ||
'attrs': [{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype' }] | ||
}, | ||
{ | ||
'tfOpName': 'TensorArrayConcatV3', | ||
'dlOpName': 'tensorArrayConcat', | ||
'category': 'control', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'tensorArrayId', 'type': 'number' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'flowIn', 'type': 'number' }, | ||
{ 'tfParamName': 'dtype', 'dlParamName': 'dtype', 'type': 'dtype' }, { | ||
'tfParamName': 'element_shape_except0', | ||
'dlParamName': 'elementShapeExcept0', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'tensorArrayId', 'type': 'number' }, | ||
{ 'start': 1, 'name': 'flowIn', 'type': 'number' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'dtype', 'name': 'dtype', 'type': 'dtype' }, { | ||
'tfName': 'element_shape_except0', | ||
'name': 'elementShapeExcept0', | ||
'type': 'shape', | ||
@@ -211,19 +167,17 @@ 'notSupported': true | ||
'tfOpName': 'TensorArraySplitV3', | ||
'dlOpName': 'tensorArraySplit', | ||
'category': 'control', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'tensorArrayId', 'type': 'number' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'tensor', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'lengths', 'type': 'number[]' }, | ||
{ 'tfInputIndex': 3, 'dlParamName': 'flowIn', 'type': 'number' }, | ||
{ 'tfParamName': 'T', 'dlParamName': 'dtype', 'type': 'dtype' } | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'tensorArrayId', 'type': 'number' }, | ||
{ 'start': 1, 'name': 'tensor', 'type': 'tensor' }, | ||
{ 'start': 2, 'name': 'lengths', 'type': 'number[]' }, | ||
{ 'start': 3, 'name': 'flowIn', 'type': 'number' }, | ||
], | ||
'attrs': [{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype' }] | ||
}, | ||
{ | ||
'tfOpName': 'TensorArraySizeV3', | ||
'dlOpName': 'tensorArraySize', | ||
'category': 'control', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'tensorArrayId', 'type': 'number' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'flowIn', 'type': 'number' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'tensorArrayId', 'type': 'number' }, | ||
{ 'start': 1, 'name': 'flowIn', 'type': 'number' } | ||
] | ||
@@ -233,9 +187,6 @@ }, | ||
'tfOpName': 'TensorArrayCloseV3', | ||
'dlOpName': 'tensorArrayClose', | ||
'category': 'control', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'tensorArrayId', 'type': 'number' } | ||
] | ||
'inputs': [{ 'start': 0, 'name': 'tensorArrayId', 'type': 'number' }] | ||
} | ||
]; | ||
//# sourceMappingURL=control.js.map |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,42 +18,2 @@ * @license | ||
*/ | ||
export declare const json: { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
defaultValue?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
tfInputIndex?: undefined; | ||
defaultValue?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': string; | ||
tfInputIndex?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
defaultValue?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
tfInputIndex?: undefined; | ||
notSupported?: undefined; | ||
})[]; | ||
}[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,24 +19,19 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [ | ||
{ | ||
'tfOpName': 'AvgPool', | ||
'dlOpName': 'avgPool', | ||
'category': 'convolution', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfParamName': 'strides', 'dlParamName': 'strides', 'type': 'number[]' }, | ||
{ 'tfParamName': 'padding', 'dlParamName': 'pad', 'type': 'string' }, { | ||
'tfParamName': 'data_format', | ||
'dlParamName': 'dataFormat', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'strides', 'name': 'strides', 'type': 'number[]' }, | ||
{ 'tfName': 'padding', 'name': 'pad', 'type': 'string' }, { | ||
'tfName': 'data_format', | ||
'name': 'dataFormat', | ||
'type': 'string', | ||
'notSupported': true | ||
}, | ||
{ 'tfParamName': 'ksize', 'dlParamName': 'kernelSize', 'type': 'number[]' }, | ||
{ | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
{ 'tfName': 'ksize', 'name': 'kernelSize', 'type': 'number[]' }, | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -45,20 +41,16 @@ }, | ||
'tfOpName': 'MaxPool', | ||
'dlOpName': 'maxPool', | ||
'category': 'convolution', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfParamName': 'strides', 'dlParamName': 'strides', 'type': 'number[]' }, | ||
{ 'tfParamName': 'padding', 'dlParamName': 'pad', 'type': 'string' }, { | ||
'tfParamName': 'data_format', | ||
'dlParamName': 'dataFormat', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'strides', 'name': 'strides', 'type': 'number[]' }, | ||
{ 'tfName': 'padding', 'name': 'pad', 'type': 'string' }, { | ||
'tfName': 'data_format', | ||
'name': 'dataFormat', | ||
'type': 'string', | ||
'notSupported': true | ||
}, | ||
{ 'tfParamName': 'ksize', 'dlParamName': 'kernelSize', 'type': 'number[]' }, | ||
{ | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
{ 'tfName': 'ksize', 'name': 'kernelSize', 'type': 'number[]' }, | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -68,23 +60,18 @@ }, | ||
'tfOpName': 'Conv1D', | ||
'dlOpName': 'conv1d', | ||
'category': 'convolution', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'filter', 'type': 'tensor' }, | ||
{ 'tfParamName': 'stride', 'dlParamName': 'stride', 'type': 'number' }, | ||
{ 'tfParamName': 'padding', 'dlParamName': 'pad', 'type': 'string' }, { | ||
'tfParamName': 'data_format', | ||
'dlParamName': 'dataFormat', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'filter', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'stride', 'name': 'stride', 'type': 'number' }, | ||
{ 'tfName': 'padding', 'name': 'pad', 'type': 'string' }, { | ||
'tfName': 'data_format', | ||
'name': 'dataFormat', | ||
'type': 'string', | ||
'defaultValue': 'NWC' | ||
}, | ||
{ | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
}, | ||
{ | ||
'tfParamName': 'dilation', | ||
'dlParamName': 'dilation', | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true }, { | ||
'tfName': 'dilation', | ||
'name': 'dilation', | ||
'type': 'number', | ||
@@ -97,29 +84,18 @@ 'defaultValue': 1 | ||
'tfOpName': 'Conv2D', | ||
'dlOpName': 'conv2d', | ||
'category': 'convolution', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'filter', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
}, | ||
{ 'tfParamName': 'strides', 'dlParamName': 'strides', 'type': 'number[]' }, | ||
{ 'tfParamName': 'padding', 'dlParamName': 'pad', 'type': 'string' }, { | ||
'tfParamName': 'useCudnnOnGpu', | ||
'dlParamName': 'useCudnnOnGpu', | ||
'type': 'bool' | ||
}, | ||
{ | ||
'tfParamName': 'data_format', | ||
'dlParamName': 'dataFormat', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'filter', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true }, | ||
{ 'tfName': 'strides', 'name': 'strides', 'type': 'number[]' }, | ||
{ 'tfName': 'padding', 'name': 'pad', 'type': 'string' }, | ||
{ 'tfName': 'useCudnnOnGpu', 'name': 'useCudnnOnGpu', 'type': 'bool' }, { | ||
'tfName': 'data_format', | ||
'name': 'dataFormat', | ||
'type': 'string', | ||
'defaultValue': 'NHWC' | ||
}, | ||
{ | ||
'tfParamName': 'dilations', | ||
'dlParamName': 'dilations', | ||
'type': 'number[]' | ||
} | ||
{ 'tfName': 'dilations', 'name': 'dilations', 'type': 'number[]' } | ||
] | ||
@@ -129,12 +105,13 @@ }, | ||
'tfOpName': 'Conv2DBackpropInput', | ||
'dlOpName': 'conv2dTranspose', | ||
'category': 'convolution', | ||
'params': [ | ||
{ 'tfInputIndex': 2, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'filter', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 0, 'dlParamName': 'outputShape', 'type': 'number[]' }, | ||
{ 'tfParamName': 'strides', 'dlParamName': 'strides', 'type': 'number[]' }, | ||
{ 'tfParamName': 'padding', 'dlParamName': 'pad', 'type': 'string' }, { | ||
'tfParamName': 'data_format', | ||
'dlParamName': 'dataFormat', | ||
'inputs': [ | ||
{ 'start': 2, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'filter', 'type': 'tensor' }, | ||
{ 'start': 0, 'name': 'outputShape', 'type': 'number[]' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'strides', 'name': 'strides', 'type': 'number[]' }, | ||
{ 'tfName': 'padding', 'name': 'pad', 'type': 'string' }, { | ||
'tfName': 'data_format', | ||
'name': 'dataFormat', | ||
'type': 'string', | ||
@@ -147,19 +124,16 @@ 'notSupported': true | ||
'tfOpName': 'DepthwiseConv2d', | ||
'dlOpName': 'depthwiseConv2d', | ||
'category': 'convolution', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'input', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'filter', 'type': 'tensor' }, | ||
{ 'tfParamName': 'strides', 'dlParamName': 'strides', 'type': 'number[]' }, | ||
{ 'tfParamName': 'padding', 'dlParamName': 'pad', 'type': 'string' }, { | ||
'tfParamName': 'data_format', | ||
'dlParamName': 'dataFormat', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'input', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'filter', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'strides', 'name': 'strides', 'type': 'number[]' }, | ||
{ 'tfName': 'padding', 'name': 'pad', 'type': 'string' }, { | ||
'tfName': 'data_format', | ||
'name': 'dataFormat', | ||
'type': 'string', | ||
'defaultValue': 'NHWC' | ||
}, | ||
{ | ||
'tfParamName': 'dilations', | ||
'dlParamName': 'dilations', | ||
'type': 'number[]' | ||
} | ||
{ 'tfName': 'dilations', 'name': 'dilations', 'type': 'number[]' } | ||
] | ||
@@ -169,19 +143,16 @@ }, | ||
'tfOpName': 'DepthwiseConv2dNative', | ||
'dlOpName': 'depthwiseConv2d', | ||
'category': 'convolution', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'input', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'filter', 'type': 'tensor' }, | ||
{ 'tfParamName': 'strides', 'dlParamName': 'strides', 'type': 'number[]' }, | ||
{ 'tfParamName': 'padding', 'dlParamName': 'pad', 'type': 'string' }, { | ||
'tfParamName': 'data_format', | ||
'dlParamName': 'dataFormat', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'input', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'filter', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'strides', 'name': 'strides', 'type': 'number[]' }, | ||
{ 'tfName': 'padding', 'name': 'pad', 'type': 'string' }, { | ||
'tfName': 'data_format', | ||
'name': 'dataFormat', | ||
'type': 'string', | ||
'defaultValue': 'NHWC' | ||
}, | ||
{ | ||
'tfParamName': 'dilations', | ||
'dlParamName': 'dilations', | ||
'type': 'number[]' | ||
} | ||
{ 'tfName': 'dilations', 'name': 'dilations', 'type': 'number[]' } | ||
] | ||
@@ -188,0 +159,0 @@ } |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,91 +18,2 @@ * @license | ||
*/ | ||
export declare const json: ({ | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
defaultValue?: undefined; | ||
tfParamName?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
tfParamName?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
defaultValue?: undefined; | ||
})[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
defaultValue?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
tfInputIndex?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
tfInputIndex?: undefined; | ||
defaultValue?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
defaultValue?: undefined; | ||
})[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
defaultValue?: undefined; | ||
tfParamName?: undefined; | ||
} | { | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
tfParamName?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
tfInputIndex?: undefined; | ||
defaultValue?: undefined; | ||
})[]; | ||
})[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,27 +19,22 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [ | ||
{ | ||
'tfOpName': 'Fill', | ||
'dlOpName': 'fill', | ||
'category': 'creation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'shape', 'type': 'number[]' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'value', 'type': 'number' }, | ||
{ 'tfParamName': 'T', 'dlParamName': 'dtype', 'type': 'dtype' } | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'shape', 'type': 'number[]' }, | ||
{ 'start': 1, 'name': 'value', 'type': 'number' }, | ||
], | ||
'attrs': [{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype' }] | ||
}, | ||
{ | ||
'tfOpName': 'LinSpace', | ||
'dlOpName': 'linspace', | ||
'category': 'creation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'start', 'type': 'number' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'stop', 'type': 'number' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'num', 'type': 'number' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'start', 'type': 'number' }, | ||
{ 'start': 1, 'name': 'stop', 'type': 'number' }, | ||
{ 'start': 2, 'name': 'num', 'type': 'number' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -48,30 +44,17 @@ }, | ||
'tfOpName': 'OneHot', | ||
'dlOpName': 'oneHot', | ||
'category': 'creation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'indices', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'depth', 'type': 'number' }, { | ||
'tfInputIndex': 2, | ||
'dlParamName': 'onValue', | ||
'type': 'number', | ||
'defaultValue': 1 | ||
}, | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'indices', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'depth', 'type': 'number' }, | ||
{ 'start': 2, 'name': 'onValue', 'type': 'number', 'defaultValue': 1 }, | ||
{ 'start': 3, 'name': 'offValue', 'type': 'number', 'defaultValue': 0 }, | ||
], | ||
'attrs': [ | ||
{ | ||
'tfInputIndex': 3, | ||
'dlParamName': 'offValue', | ||
'tfName': 'axis', | ||
'name': 'axis', | ||
'type': 'number', | ||
'defaultValue': 0 | ||
}, | ||
{ | ||
'tfParamName': 'axis', | ||
'dlParamName': 'axis', | ||
'type': 'number', | ||
'notSupported': true | ||
}, | ||
{ | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -81,26 +64,26 @@ }, | ||
'tfOpName': 'Ones', | ||
'dlOpName': 'ones', | ||
'category': 'creation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'shape', 'type': 'number[]' }, | ||
{ 'tfParamName': 'T', 'dlParamName': 'dtype', 'type': 'dtype' } | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'shape', 'type': 'number[]' }, | ||
], | ||
'attrs': [{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype' }] | ||
}, | ||
{ | ||
'tfOpName': 'OnesLike', | ||
'dlOpName': 'onesLike', | ||
'category': 'creation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfParamName': 'dtype', 'dlParamName': 'dtype', 'type': 'dtype' } | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [{ 'tfName': 'dtype', 'name': 'dtype', 'type': 'dtype' }] | ||
}, | ||
{ | ||
'tfOpName': 'RandomUniform', | ||
'dlOpName': 'randomUniform', | ||
'category': 'creation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'shape', 'type': 'number[]' }, { | ||
'tfParamName': 'minval', | ||
'dlParamName': 'minval', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'shape', 'type': 'number[]' }, | ||
], | ||
'attrs': [ | ||
{ | ||
'tfName': 'minval', | ||
'name': 'minval', | ||
'type': 'number', | ||
@@ -110,26 +93,16 @@ 'defaultValue': 0 | ||
{ | ||
'tfParamName': 'maxval', | ||
'dlParamName': 'maxval', | ||
'tfName': 'maxval', | ||
'name': 'maxval', | ||
'type': 'number', | ||
'defaultValue': 1 | ||
}, | ||
{ 'tfParamName': 'dtype', 'dlParamName': 'dtype', 'type': 'dtype' }, { | ||
'tfParamName': 'seed', | ||
'dlParamName': 'seed', | ||
{ 'tfName': 'dtype', 'name': 'dtype', 'type': 'dtype' }, | ||
{ 'tfName': 'seed', 'name': 'seed', 'type': 'number', 'defaultValue': 0 }, { | ||
'tfName': 'seed2', | ||
'name': 'seed2', | ||
'type': 'number', | ||
'defaultValue': 0 | ||
}, | ||
{ | ||
'tfParamName': 'seed2', | ||
'dlParamName': 'seed2', | ||
'type': 'number', | ||
'defaultValue': 0, | ||
'notSupported': true | ||
}, | ||
{ | ||
'tfParamName': 'T', | ||
'dlParamName': 'T', | ||
'type': 'number', | ||
'notSupported': true | ||
} | ||
{ 'tfName': 'T', 'name': 'T', 'type': 'number', 'notSupported': true } | ||
] | ||
@@ -139,23 +112,20 @@ }, | ||
'tfOpName': 'Range', | ||
'dlOpName': 'range', | ||
'category': 'creation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'start', 'type': 'number' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'stop', 'type': 'number' }, { | ||
'tfInputIndex': 2, | ||
'dlParamName': 'step', | ||
'type': 'number', | ||
'defaultValue': 0 | ||
}, | ||
{ 'tfParamName': 'Tidx', 'dlParamName': 'dtype', 'type': 'dtype' } | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'start', 'type': 'number' }, | ||
{ 'start': 1, 'name': 'stop', 'type': 'number' }, | ||
{ 'start': 2, 'name': 'step', 'type': 'number', 'defaultValue': 0 }, | ||
], | ||
'attrs': [{ 'tfName': 'Tidx', 'name': 'dtype', 'type': 'dtype' }] | ||
}, | ||
{ | ||
'tfOpName': 'truncatedNormal', | ||
'dlOpName': 'truncatedNormal', | ||
'tfOpName': 'TruncatedNormal', | ||
'category': 'creation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'shape', 'type': 'number[]' }, { | ||
'tfParamName': 'means', | ||
'dlParamName': 'mean', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'shape', 'type': 'number[]' }, | ||
], | ||
'attrs': [ | ||
{ | ||
'tfName': 'means', | ||
'name': 'mean', | ||
'type': 'number', | ||
@@ -165,10 +135,10 @@ 'defaultValue': 0.0 | ||
{ | ||
'tfParamName': 'stddev', | ||
'dlParamName': 'stdDev', | ||
'tfName': 'stddev', | ||
'name': 'stdDev', | ||
'type': 'number', | ||
'defaultValue': 1.0 | ||
}, | ||
{ 'tfParamName': 'seed', 'dlParamName': 'seed', 'type': 'number' }, { | ||
'tfParamName': 'seed2', | ||
'dlParamName': 'seed2', | ||
{ 'tfName': 'seed', 'name': 'seed', 'type': 'number' }, { | ||
'tfName': 'seed2', | ||
'name': 'seed2', | ||
'type': 'number', | ||
@@ -178,8 +148,4 @@ 'defaultValue': 0, | ||
}, | ||
{ 'tfParamName': 'dtype', 'dlParamName': 'dtype', 'type': 'dtype' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'T', | ||
'type': 'number', | ||
'notSupported': true | ||
} | ||
{ 'tfName': 'dtype', 'name': 'dtype', 'type': 'dtype' }, | ||
{ 'tfName': 'T', 'name': 'T', 'type': 'number', 'notSupported': true } | ||
] | ||
@@ -189,19 +155,17 @@ }, | ||
'tfOpName': 'Zeros', | ||
'dlOpName': 'zeros', | ||
'category': 'creation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'shape', 'type': 'number[]' }, | ||
{ 'tfParamName': 'T', 'dlParamName': 'dtype', 'type': 'dtype' } | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'shape', 'type': 'number[]' }, | ||
], | ||
'attrs': [{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype' }] | ||
}, | ||
{ | ||
'tfOpName': 'ZerosLike', | ||
'dlOpName': 'zerosLike', | ||
'category': 'creation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfParamName': 'T', 'dlParamName': 'dtype', 'type': 'dtype' } | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype' }] | ||
} | ||
]; | ||
//# sourceMappingURL=creation.js.map |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,19 +18,2 @@ * @license | ||
*/ | ||
export declare const json: { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
})[]; | ||
}[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,13 +19,11 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [ | ||
{ | ||
'tfOpName': 'NonMaxSuppressionV2', | ||
'dlOpName': 'nonMaxSuppression', | ||
'category': 'dynamic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'boxes', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'scores', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'maxOutputSize', 'type': 'number' }, | ||
{ 'tfInputIndex': 3, 'dlParamName': 'iouThreshold', 'type': 'number' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'boxes', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'scores', 'type': 'tensor' }, | ||
{ 'start': 2, 'name': 'maxOutputSize', 'type': 'number' }, | ||
{ 'start': 3, 'name': 'iouThreshold', 'type': 'number' } | ||
] | ||
@@ -34,10 +33,9 @@ }, | ||
'tfOpName': 'NonMaxSuppressionV3', | ||
'dlOpName': 'nonMaxSuppression', | ||
'category': 'dynamic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'boxes', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'scores', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'maxOutputSize', 'type': 'number' }, | ||
{ 'tfInputIndex': 3, 'dlParamName': 'iouThreshold', 'type': 'number' }, | ||
{ 'tfInputIndex': 4, 'dlParamName': 'scoreThreshold', 'type': 'number' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'boxes', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'scores', 'type': 'tensor' }, | ||
{ 'start': 2, 'name': 'maxOutputSize', 'type': 'number' }, | ||
{ 'start': 3, 'name': 'iouThreshold', 'type': 'number' }, | ||
{ 'start': 4, 'name': 'scoreThreshold', 'type': 'number' } | ||
] | ||
@@ -47,11 +45,8 @@ }, | ||
'tfOpName': 'Where', | ||
'dlOpName': 'whereAsync', | ||
'category': 'dynamic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'condition', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'condition', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -61,15 +56,15 @@ }, | ||
'tfOpName': 'ListDiff', | ||
'dlOpName': 'setdiff1dAsync', | ||
'category': 'dynamic', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'y', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'y', 'type': 'tensor' }, | ||
], | ||
'attrs': [{ | ||
'tfName': 'T', | ||
'name': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
] | ||
}] | ||
} | ||
]; | ||
//# sourceMappingURL=dynamic.js.map |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,17 +18,2 @@ * @license | ||
*/ | ||
export declare const json: { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
tfInputIndex?: undefined; | ||
})[]; | ||
}[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,13 +19,11 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [{ | ||
'tfOpName': 'TopKV2', | ||
'dlOpName': 'topK', | ||
'category': 'evaluation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'k', 'type': 'number' }, | ||
{ 'tfParamName': 'sorted', 'dlParamName': 'sorted', 'type': 'bool' } | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'k', 'type': 'number' }, | ||
], | ||
'attrs': [{ 'tfName': 'sorted', 'name': 'sorted', 'type': 'bool' }] | ||
}]; | ||
//# sourceMappingURL=evaluation.js.map |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,52 +18,2 @@ * @license | ||
*/ | ||
export declare const json: ({ | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
params?: undefined; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfInputParamLength?: undefined; | ||
tfParamName?: undefined; | ||
notSupprted?: undefined; | ||
defaultValue?: undefined; | ||
} | { | ||
'tfInputIndex': number; | ||
'tfInputParamLength': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
notSupprted?: undefined; | ||
defaultValue?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
tfInputIndex?: undefined; | ||
tfInputParamLength?: undefined; | ||
notSupprted?: undefined; | ||
defaultValue?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupprted': boolean; | ||
tfInputIndex?: undefined; | ||
tfInputParamLength?: undefined; | ||
defaultValue?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
tfInputIndex?: undefined; | ||
tfInputParamLength?: undefined; | ||
notSupprted?: undefined; | ||
})[]; | ||
})[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,12 +19,12 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [ | ||
{ | ||
'tfOpName': 'PlaceholderWithDefault', | ||
'dlOpName': 'placeholder', | ||
'category': 'graph', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'default', 'type': 'tensor' }, | ||
{ 'tfParamName': 'shape', 'dlParamName': 'shape', 'type': 'shape' }, | ||
{ 'tfParamName': 'dtype', 'dlParamName': 'dtype', 'type': 'dtype' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'default', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'shape', 'name': 'shape', 'type': 'shape' }, | ||
{ 'tfName': 'dtype', 'name': 'dtype', 'type': 'dtype' } | ||
] | ||
@@ -33,70 +34,55 @@ }, | ||
'tfOpName': 'Placeholder', | ||
'dlOpName': 'placeholder', | ||
'category': 'graph', | ||
'params': [ | ||
{ 'tfParamName': 'shape', 'dlParamName': 'shape', 'type': 'shape' }, | ||
{ 'tfParamName': 'dtype', 'dlParamName': 'dtype', 'type': 'dtype' } | ||
'attrs': [ | ||
{ 'tfName': 'shape', 'name': 'shape', 'type': 'shape' }, | ||
{ 'tfName': 'dtype', 'name': 'dtype', 'type': 'dtype' } | ||
] | ||
}, | ||
{ 'tfOpName': 'Const', 'dlOpName': 'const', 'category': 'graph' }, { | ||
{ 'tfOpName': 'Const', 'category': 'graph' }, { | ||
'tfOpName': 'Identity', | ||
'dlOpName': 'identity', | ||
'category': 'graph', | ||
'params': [{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }] | ||
'inputs': [{ 'start': 0, 'name': 'x', 'type': 'tensor' }] | ||
}, | ||
{ | ||
'tfOpName': 'Snapshot', | ||
'dlOpName': 'snapshot', | ||
'category': 'graph', | ||
'params': [{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }] | ||
'inputs': [{ 'start': 0, 'name': 'x', 'type': 'tensor' }] | ||
}, | ||
{ | ||
'tfOpName': 'Rank', | ||
'dlOpName': 'rank', | ||
'category': 'graph', | ||
'params': [{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }] | ||
'inputs': [{ 'start': 0, 'name': 'x', 'type': 'tensor' }] | ||
}, | ||
{ | ||
'tfOpName': 'Size', | ||
'dlOpName': 'size', | ||
'category': 'graph', | ||
'params': [{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }] | ||
'inputs': [{ 'start': 0, 'name': 'x', 'type': 'tensor' }] | ||
}, | ||
{ | ||
'tfOpName': 'Shape', | ||
'dlOpName': 'shape', | ||
'category': 'graph', | ||
'params': [{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }] | ||
'inputs': [{ 'start': 0, 'name': 'x', 'type': 'tensor' }] | ||
}, | ||
{ | ||
'tfOpName': 'ShapeN', | ||
'dlOpName': 'shapeN', | ||
'category': 'graph', | ||
'params': [{ | ||
'tfInputIndex': 0, | ||
'tfInputParamLength': 0, | ||
'dlParamName': 'x', | ||
'type': 'tensors' | ||
}] | ||
'inputs': [{ 'start': 0, 'end': 0, 'name': 'x', 'type': 'tensors' }] | ||
}, | ||
{ | ||
'tfOpName': 'Print', | ||
'dlOpName': 'print', | ||
'category': 'graph', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfInputIndex': 1, | ||
'tfInputParamLength': 1, | ||
'dlParamName': 'data', | ||
'type': 'tensors' | ||
}, | ||
{ 'tfParamName': 'message', 'dlParamName': 'message', 'type': 'string' }, { | ||
'tfParamName': 'first_n', | ||
'dlParamName': 'firstN', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'data', 'type': 'tensors' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'message', 'name': 'message', 'type': 'string' }, { | ||
'tfName': 'first_n', | ||
'name': 'firstN', | ||
'type': 'number', | ||
'notSupprted': true | ||
'notSupported': true | ||
}, | ||
{ | ||
'tfParamName': 'summarize', | ||
'dlParamName': 'summarize', | ||
'tfName': 'summarize', | ||
'name': 'summarize', | ||
'type': 'number', | ||
@@ -107,16 +93,16 @@ 'defaultValue': 3 | ||
}, | ||
{ 'tfOpName': 'NoOp', 'dlOpName': 'noop', 'category': 'graph', 'params': [] }, { | ||
{ 'tfOpName': 'NoOp', 'category': 'graph', 'inputs': [] }, { | ||
'tfOpName': 'StopGradient', | ||
'dlOpName': 'stopGradient', | ||
'category': 'graph', | ||
'params': [{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }] | ||
'inputs': [{ 'start': 0, 'name': 'x', 'type': 'tensor' }] | ||
}, | ||
{ | ||
'tfOpName': 'FakeQuantWithMinMaxVars', | ||
'dlOpName': 'fakeQuantWithMinMaxVars', | ||
'category': 'graph', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfParamName': 'min', 'dlParamName': 'min', 'type': 'number' }, | ||
{ 'tfParamName': 'max', 'dlParamName': 'max', 'type': 'number' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'min', 'name': 'min', 'type': 'number' }, | ||
{ 'tfName': 'max', 'name': 'max', 'type': 'number' } | ||
] | ||
@@ -123,0 +109,0 @@ } |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,25 +18,2 @@ * @license | ||
*/ | ||
export declare const json: { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
tfInputIndex?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
})[]; | ||
}[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,21 +19,13 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [ | ||
{ | ||
'tfOpName': 'ResizeBilinear', | ||
'dlOpName': 'resizeBilinear', | ||
'category': 'image', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'images', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'size', 'type': 'number[]' }, { | ||
'tfParamName': 'align_corners', | ||
'dlParamName': 'alignCorners', | ||
'type': 'bool' | ||
}, | ||
{ | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'images', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'size', 'type': 'number[]' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'align_corners', 'name': 'alignCorners', 'type': 'bool' }, | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -42,17 +35,10 @@ }, | ||
'tfOpName': 'ResizeNearestNeighbor', | ||
'dlOpName': 'resizeNearestNeighbor', | ||
'category': 'image', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'images', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'size', 'type': 'number[]' }, { | ||
'tfParamName': 'align_corners', | ||
'dlParamName': 'alignCorners', | ||
'type': 'bool' | ||
}, | ||
{ | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'images', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'size', 'type': 'number[]' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'align_corners', 'name': 'alignCorners', 'type': 'bool' }, | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -62,12 +48,13 @@ }, | ||
'tfOpName': 'CropAndResize', | ||
'dlOpName': 'cropAndResize', | ||
'category': 'image', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'image', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'boxes', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'boxInd', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 3, 'dlParamName': 'cropSize', 'type': 'number[]' }, | ||
{ 'tfParamName': 'method', 'dlParamName': 'method', 'type': 'string' }, { | ||
'tfParamName': 'extrapolation_value', | ||
'dlParamName': 'extrapolationValue', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'image', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'boxes', 'type': 'tensor' }, | ||
{ 'start': 2, 'name': 'boxInd', 'type': 'tensor' }, | ||
{ 'start': 3, 'name': 'cropSize', 'type': 'number[]' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'method', 'name': 'method', 'type': 'string' }, { | ||
'tfName': 'extrapolation_value', | ||
'name': 'extrapolationValue', | ||
'type': 'number' | ||
@@ -74,0 +61,0 @@ } |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,19 +18,2 @@ * @license | ||
*/ | ||
export declare const json: { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
})[]; | ||
}[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,16 +19,12 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [ | ||
{ | ||
'tfOpName': 'Equal', | ||
'dlOpName': 'equal', | ||
'category': 'logical', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -37,12 +34,9 @@ }, | ||
'tfOpName': 'NotEqual', | ||
'dlOpName': 'notEqual', | ||
'category': 'logical', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -52,12 +46,9 @@ }, | ||
'tfOpName': 'Greater', | ||
'dlOpName': 'greater', | ||
'category': 'logical', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -67,12 +58,9 @@ }, | ||
'tfOpName': 'GreaterEqual', | ||
'dlOpName': 'greaterEqual', | ||
'category': 'logical', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -82,12 +70,9 @@ }, | ||
'tfOpName': 'Less', | ||
'dlOpName': 'less', | ||
'category': 'logical', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -97,12 +82,9 @@ }, | ||
'tfOpName': 'LessEqual', | ||
'dlOpName': 'lessEqual', | ||
'category': 'logical', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -112,12 +94,9 @@ }, | ||
'tfOpName': 'LogicalAnd', | ||
'dlOpName': 'logicalAnd', | ||
'category': 'logical', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -127,11 +106,8 @@ }, | ||
'tfOpName': 'LogicalNot', | ||
'dlOpName': 'logicalNot', | ||
'category': 'logical', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -141,12 +117,9 @@ }, | ||
'tfOpName': 'LogicalOr', | ||
'dlOpName': 'logicalOr', | ||
'category': 'logical', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -156,16 +129,16 @@ }, | ||
'tfOpName': 'Select', | ||
'dlOpName': 'where', | ||
'category': 'logical', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'condition', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'condition', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 2, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [{ | ||
'tfName': 'T', | ||
'name': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
] | ||
}] | ||
} | ||
]; | ||
//# sourceMappingURL=logical.js.map |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,28 +18,2 @@ * @license | ||
*/ | ||
export declare const json: { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
defaultValue?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': boolean; | ||
tfInputIndex?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
defaultValue?: undefined; | ||
})[]; | ||
}[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,13 +19,14 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [ | ||
{ | ||
'tfOpName': 'MatMul', | ||
'dlOpName': 'matMul', | ||
'category': 'matrices', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'transpose_a', | ||
'dlParamName': 'transposeA', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ | ||
'tfName': 'transpose_a', | ||
'name': 'transposeA', | ||
'type': 'bool', | ||
@@ -34,13 +36,8 @@ 'defaultValue': false | ||
{ | ||
'tfParamName': 'transpose_b', | ||
'dlParamName': 'transposeB', | ||
'tfName': 'transpose_b', | ||
'name': 'transposeB', | ||
'type': 'bool', | ||
'defaultValue': false | ||
}, | ||
{ | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -50,9 +47,11 @@ }, | ||
'tfOpName': 'BatchMatMul', | ||
'dlOpName': 'matMul', | ||
'category': 'matrices', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'a', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'b', 'type': 'tensor' }, { | ||
'tfParamName': 'adj_x', | ||
'dlParamName': 'transposeA', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'a', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'b', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ | ||
'tfName': 'adj_x', | ||
'name': 'transposeA', | ||
'type': 'bool', | ||
@@ -62,13 +61,8 @@ 'defaultValue': false | ||
{ | ||
'tfParamName': 'adj_y', | ||
'dlParamName': 'transposeB', | ||
'tfName': 'adj_y', | ||
'name': 'transposeB', | ||
'type': 'bool', | ||
'defaultValue': false | ||
}, | ||
{ | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
@@ -78,15 +72,15 @@ }, | ||
'tfOpName': 'Transpose', | ||
'dlOpName': 'transpose', | ||
'category': 'matrices', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'perm', 'type': 'number[]' }, { | ||
'tfParamName': 'T', | ||
'dlParamName': 'dtype', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'perm', 'type': 'number[]' }, | ||
], | ||
'attrs': [{ | ||
'tfName': 'T', | ||
'name': 'dtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
} | ||
] | ||
}] | ||
} | ||
]; | ||
//# sourceMappingURL=matrices.js.map |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,47 +18,2 @@ * @license | ||
*/ | ||
export declare const json: ({ | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
defaultValue?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
tfInputIndex?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
defaultValue?: undefined; | ||
})[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
defaultValue?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': boolean; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
})[]; | ||
})[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,16 +19,17 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [ | ||
{ | ||
'tfOpName': 'FusedBatchNorm', | ||
'dlOpName': 'batchNormalization', | ||
'category': 'normalization', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'scale', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'offset', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 3, 'dlParamName': 'mean', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 4, 'dlParamName': 'variance', 'type': 'tensor' }, { | ||
'tfParamName': 'epsilon', | ||
'dlParamName': 'epsilon', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'scale', 'type': 'tensor' }, | ||
{ 'start': 2, 'name': 'offset', 'type': 'tensor' }, | ||
{ 'start': 3, 'name': 'mean', 'type': 'tensor' }, | ||
{ 'start': 4, 'name': 'variance', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ | ||
'tfName': 'epsilon', | ||
'name': 'epsilon', | ||
'type': 'number', | ||
@@ -37,4 +39,4 @@ 'defaultValue': 0.001 | ||
{ | ||
'tfParamName': 'data_format', | ||
'dlParamName': 'dataFormat', | ||
'tfName': 'data_format', | ||
'name': 'dataFormat', | ||
'type': 'string', | ||
@@ -47,12 +49,14 @@ 'notSupported': true | ||
'tfOpName': 'FusedBatchNormV2', | ||
'dlOpName': 'batchNormalization', | ||
'category': 'normalization', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'scale', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'offset', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 3, 'dlParamName': 'mean', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 4, 'dlParamName': 'variance', 'type': 'tensor' }, { | ||
'tfParamName': 'epsilon', | ||
'dlParamName': 'epsilon', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'scale', 'type': 'tensor' }, | ||
{ 'start': 2, 'name': 'offset', 'type': 'tensor' }, | ||
{ 'start': 3, 'name': 'mean', 'type': 'tensor' }, | ||
{ 'start': 4, 'name': 'variance', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ | ||
'tfName': 'epsilon', | ||
'name': 'epsilon', | ||
'type': 'number', | ||
@@ -62,4 +66,4 @@ 'defaultValue': 0.001 | ||
{ | ||
'tfParamName': 'data_format', | ||
'dlParamName': 'dataFormat', | ||
'tfName': 'data_format', | ||
'name': 'dataFormat', | ||
'type': 'string', | ||
@@ -72,14 +76,17 @@ 'notSupported': true | ||
'tfOpName': 'LRN', | ||
'dlOpName': 'localResponseNormalization', | ||
'category': 'normalization', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'depth_radius', | ||
'dlParamName': 'radius', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ | ||
'tfName': 'depth_radius', | ||
'name': 'radius', | ||
'type': 'number', | ||
'defaultValue': 5 | ||
}, | ||
{ 'tfName': 'bias', 'name': 'bias', 'type': 'number', 'defaultValue': 1.0 }, | ||
{ | ||
'tfParamName': 'bias', | ||
'dlParamName': 'bias', | ||
'tfName': 'alpha', | ||
'name': 'alpha', | ||
'type': 'number', | ||
@@ -89,11 +96,5 @@ 'defaultValue': 1.0 | ||
{ | ||
'tfParamName': 'alpha', | ||
'dlParamName': 'alpha', | ||
'tfName': 'beta', | ||
'name': 'beta', | ||
'type': 'number', | ||
'defaultValue': 1.0 | ||
}, | ||
{ | ||
'tfParamName': 'beta', | ||
'dlParamName': 'beta', | ||
'type': 'number', | ||
'defaultValue': 0.5 | ||
@@ -105,30 +106,28 @@ } | ||
'tfOpName': 'Softmax', | ||
'dlOpName': 'softmax', | ||
'category': 'normalization', | ||
'params': [{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }] | ||
'inputs': [{ 'start': 0, 'name': 'x', 'type': 'tensor' }] | ||
}, | ||
{ | ||
'tfOpName': 'LogSoftmax', | ||
'dlOpName': 'logSoftmax', | ||
'category': 'normalization', | ||
'params': [{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }] | ||
'inputs': [{ 'start': 0, 'name': 'x', 'type': 'tensor' }] | ||
}, | ||
{ | ||
'tfOpName': 'SparseToDense', | ||
'dlOpName': 'sparseToDense', | ||
'category': 'normalization', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'sparseIndices', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'outputShape', 'type': 'number[]' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'sparseValues', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 3, 'dlParamName': 'defaultValue', 'type': 'tensor' }, { | ||
'tfParamName': 'validate_indices', | ||
'dlParamName': 'validateIndices', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'sparseIndices', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'outputShape', 'type': 'number[]' }, | ||
{ 'start': 2, 'name': 'sparseValues', 'type': 'tensor' }, | ||
{ 'start': 3, 'name': 'defaultValue', 'type': 'tensor' }, | ||
], | ||
'attrs': [{ | ||
'tfName': 'validate_indices', | ||
'name': 'validateIndices', | ||
'type': 'bool', | ||
'defaultValue': true, | ||
'notSupported': true | ||
} | ||
] | ||
}] | ||
} | ||
]; | ||
//# sourceMappingURL=normalization.js.map |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,17 +18,2 @@ * @license | ||
*/ | ||
export declare const json: { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
tfInputIndex?: undefined; | ||
})[]; | ||
}[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,71 +19,63 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [ | ||
{ | ||
'tfOpName': 'Max', | ||
'dlOpName': 'max', | ||
'category': 'reduction', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'axis', 'type': 'number[]' }, | ||
{ 'tfParamName': 'keep_dims', 'dlParamName': 'keepDims', 'type': 'bool' } | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'axis', 'type': 'number[]' }, | ||
], | ||
'attrs': [{ 'tfName': 'keep_dims', 'name': 'keepDims', 'type': 'bool' }] | ||
}, | ||
{ | ||
'tfOpName': 'Mean', | ||
'dlOpName': 'mean', | ||
'category': 'reduction', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'axis', 'type': 'number[]' }, | ||
{ 'tfParamName': 'keep_dims', 'dlParamName': 'keepDims', 'type': 'bool' } | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'axis', 'type': 'number[]' }, | ||
], | ||
'attrs': [{ 'tfName': 'keep_dims', 'name': 'keepDims', 'type': 'bool' }] | ||
}, | ||
{ | ||
'tfOpName': 'Min', | ||
'dlOpName': 'min', | ||
'category': 'reduction', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'axis', 'type': 'number[]' }, | ||
{ 'tfParamName': 'keep_dims', 'dlParamName': 'keepDims', 'type': 'bool' } | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'axis', 'type': 'number[]' }, | ||
], | ||
'attrs': [{ 'tfName': 'keep_dims', 'name': 'keepDims', 'type': 'bool' }] | ||
}, | ||
{ | ||
'tfOpName': 'Sum', | ||
'dlOpName': 'sum', | ||
'category': 'reduction', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'axis', 'type': 'number[]' }, | ||
{ 'tfParamName': 'keep_dims', 'dlParamName': 'keepDims', 'type': 'bool' } | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'axis', 'type': 'number[]' }, | ||
], | ||
'attrs': [{ 'tfName': 'keep_dims', 'name': 'keepDims', 'type': 'bool' }] | ||
}, | ||
{ | ||
'tfOpName': 'All', | ||
'dlOpName': 'all', | ||
'category': 'reduction', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'axis', 'type': 'number[]' }, | ||
{ 'tfParamName': 'keep_dims', 'dlParamName': 'keepDims', 'type': 'bool' } | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'axis', 'type': 'number[]' }, | ||
], | ||
'attrs': [{ 'tfName': 'keep_dims', 'name': 'keepDims', 'type': 'bool' }] | ||
}, | ||
{ | ||
'tfOpName': 'Any', | ||
'dlOpName': 'any', | ||
'category': 'reduction', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'axis', 'type': 'number[]' }, | ||
{ 'tfParamName': 'keep_dims', 'dlParamName': 'keepDims', 'type': 'bool' } | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'axis', 'type': 'number[]' }, | ||
], | ||
'attrs': [{ 'tfName': 'keep_dims', 'name': 'keepDims', 'type': 'bool' }] | ||
}, | ||
{ | ||
'tfOpName': 'ArgMax', | ||
'dlOpName': 'argMax', | ||
'category': 'reduction', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'axis', 'type': 'number' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'axis', 'type': 'number' } | ||
] | ||
@@ -92,7 +85,6 @@ }, | ||
'tfOpName': 'ArgMin', | ||
'dlOpName': 'argMin', | ||
'category': 'reduction', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'axis', 'type': 'number' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'axis', 'type': 'number' } | ||
] | ||
@@ -102,14 +94,10 @@ }, | ||
'tfOpName': 'Prod', | ||
'dlOpName': 'prod', | ||
'category': 'reduction', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'axis', 'type': 'number[]' }, { | ||
'tfParamName': 'keep_dims', | ||
'dlParamName': 'keepDims', | ||
'type': 'bool' | ||
} | ||
] | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'axis', 'type': 'number[]' }, | ||
], | ||
'attrs': [{ 'tfName': 'keep_dims', 'name': 'keepDims', 'type': 'bool' }] | ||
} | ||
]; | ||
//# sourceMappingURL=reduction.js.map |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,129 +18,2 @@ * @license | ||
*/ | ||
export declare const json: ({ | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'tfInputParamLength': number; | ||
'dlParamName': string; | ||
'type': string; | ||
} | { | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfInputParamLength?: undefined; | ||
})[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
defaultValue?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
tfInputIndex?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
defaultValue?: undefined; | ||
})[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
notSupported?: undefined; | ||
} | { | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupported': boolean; | ||
})[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'tfInputParamLength': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
defaultValue?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
tfInputIndex?: undefined; | ||
tfInputParamLength?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
tfInputParamLength?: undefined; | ||
})[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
tfParamName?: undefined; | ||
} | { | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
defaultValue?: undefined; | ||
tfParamName?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
tfInputIndex?: undefined; | ||
})[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
defaultValue?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': boolean; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
})[]; | ||
})[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,16 +19,9 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [ | ||
{ | ||
'tfOpName': 'ConcatV2', | ||
'dlOpName': 'concat', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ | ||
'tfInputIndex': 0, | ||
'tfInputParamLength': 1, | ||
'dlParamName': 'tensors', | ||
'type': 'tensors' | ||
}, | ||
{ 'tfInputIndex': -1, 'dlParamName': 'axis', 'type': 'number' } | ||
'inputs': [ | ||
{ 'start': 0, 'end': -1, 'name': 'tensors', 'type': 'tensors' }, | ||
{ 'start': -1, 'name': 'axis', 'type': 'number' } | ||
] | ||
@@ -37,12 +31,6 @@ }, | ||
'tfOpName': 'Concat', | ||
'dlOpName': 'concat', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ | ||
'tfInputIndex': 1, | ||
'tfInputParamLength': 1, | ||
'dlParamName': 'tensors', | ||
'type': 'tensors' | ||
}, | ||
{ 'tfInputIndex': 0, 'dlParamName': 'axis', 'type': 'number' } | ||
'inputs': [ | ||
{ 'start': 1, 'end': 0, 'name': 'tensors', 'type': 'tensors' }, | ||
{ 'start': 0, 'name': 'axis', 'type': 'number' } | ||
] | ||
@@ -52,12 +40,7 @@ }, | ||
'tfOpName': 'GatherV2', | ||
'dlOpName': 'gather', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'indices', 'type': 'tensor' }, { | ||
'tfInputIndex': 2, | ||
'dlParamName': 'axis', | ||
'type': 'number', | ||
'defaultValue': 0 | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'indices', 'type': 'tensor' }, | ||
{ 'start': 2, 'name': 'axis', 'type': 'number', 'defaultValue': 0 } | ||
] | ||
@@ -67,15 +50,11 @@ }, | ||
'tfOpName': 'Gather', | ||
'dlOpName': 'gather', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'indices', 'type': 'tensor' }, { | ||
'tfParamName': 'axis', | ||
'dlParamName': 'axis', | ||
'type': 'number', | ||
'defaultValue': 0 | ||
}, | ||
{ | ||
'tfParamName': 'validate_indices', | ||
'dlParamName': 'validateIndices', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'indices', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'axis', 'name': 'axis', 'type': 'number', 'defaultValue': 0 }, { | ||
'tfName': 'validate_indices', | ||
'name': 'validateIndices', | ||
'type': 'bool', | ||
@@ -88,11 +67,6 @@ 'notSupported': true | ||
'tfOpName': 'Reverse', | ||
'dlOpName': 'reverse', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfInputIndex': 1, | ||
'dlParamName': 'dims', | ||
'type': 'bool', | ||
'notSupported': true | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'dims', 'type': 'bool', 'notSupported': true } | ||
] | ||
@@ -102,7 +76,6 @@ }, | ||
'tfOpName': 'ReverseV2', | ||
'dlOpName': 'reverse', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'axis', 'type': 'number[]' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'axis', 'type': 'number[]' } | ||
] | ||
@@ -112,8 +85,7 @@ }, | ||
'tfOpName': 'Slice', | ||
'dlOpName': 'slice', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'begin', 'type': 'number[]' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'size', 'type': 'number[]' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'begin', 'type': 'number[]' }, | ||
{ 'start': 2, 'name': 'size', 'type': 'number[]' } | ||
] | ||
@@ -123,11 +95,13 @@ }, | ||
'tfOpName': 'StridedSlice', | ||
'dlOpName': 'stridedSlice', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'begin', 'type': 'number[]' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'end', 'type': 'number[]' }, | ||
{ 'tfInputIndex': 3, 'dlParamName': 'strides', 'type': 'number[]' }, { | ||
'tfParamName': 'begin_mask', | ||
'dlParamName': 'beginMask', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'begin', 'type': 'number[]' }, | ||
{ 'start': 2, 'name': 'end', 'type': 'number[]' }, | ||
{ 'start': 3, 'name': 'strides', 'type': 'number[]' }, | ||
], | ||
'attrs': [ | ||
{ | ||
'tfName': 'begin_mask', | ||
'name': 'beginMask', | ||
'type': 'number', | ||
@@ -137,4 +111,4 @@ 'defaultValue': 0 | ||
{ | ||
'tfParamName': 'end_mask', | ||
'dlParamName': 'endMask', | ||
'tfName': 'end_mask', | ||
'name': 'endMask', | ||
'type': 'number', | ||
@@ -144,4 +118,4 @@ 'defaultValue': 0 | ||
{ | ||
'tfParamName': 'new_axis_mask', | ||
'dlParamName': 'newAxisMask', | ||
'tfName': 'new_axis_mask', | ||
'name': 'newAxisMask', | ||
'type': 'number', | ||
@@ -151,4 +125,4 @@ 'defaultValue': 0 | ||
{ | ||
'tfParamName': 'ellipsis_mask', | ||
'dlParamName': 'ellipsisMask', | ||
'tfName': 'ellipsis_mask', | ||
'name': 'ellipsisMask', | ||
'type': 'number', | ||
@@ -158,4 +132,4 @@ 'defaultValue': 0 | ||
{ | ||
'tfParamName': 'shrink_axis_mask', | ||
'dlParamName': 'shrinkAxisMask', | ||
'tfName': 'shrink_axis_mask', | ||
'name': 'shrinkAxisMask', | ||
'type': 'number', | ||
@@ -168,17 +142,8 @@ 'defaultValue': 0 | ||
'tfOpName': 'Pack', | ||
'dlOpName': 'stack', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ | ||
'tfInputIndex': 0, | ||
'tfInputParamLength': 0, | ||
'dlParamName': 'tensors', | ||
'type': 'tensors' | ||
}, | ||
{ | ||
'tfParamName': 'axis', | ||
'dlParamName': 'axis', | ||
'type': 'number', | ||
'defaultValue': 0 | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'end': 0, 'name': 'tensors', 'type': 'tensors' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'axis', 'name': 'axis', 'type': 'number', 'defaultValue': 0 } | ||
] | ||
@@ -188,21 +153,11 @@ }, | ||
'tfOpName': 'Unpack', | ||
'dlOpName': 'unstack', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ | ||
'tfInputIndex': 0, | ||
'tfInputParamLength': 0, | ||
'dlParamName': 'tensor', | ||
'type': 'tensor' | ||
}, | ||
{ | ||
'tfParamName': 'axis', | ||
'dlParamName': 'axis', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'tensor', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'axis', 'name': 'axis', 'type': 'number', 'defaultValue': 0 }, { | ||
'tfName': 'num', | ||
'name': 'num', | ||
'type': 'number', | ||
'defaultValue': 0 | ||
}, | ||
{ | ||
'tfParamName': 'num', | ||
'dlParamName': 'num', | ||
'type': 'number', | ||
'defaultValue': 0, | ||
@@ -215,7 +170,6 @@ 'notSupported': true | ||
'tfOpName': 'Tile', | ||
'dlOpName': 'tile', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'reps', 'type': 'number[]' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'reps', 'type': 'number[]' } | ||
] | ||
@@ -225,32 +179,21 @@ }, | ||
'tfOpName': 'Split', | ||
'dlOpName': 'split', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ | ||
'tfInputIndex': 0, | ||
'dlParamName': 'axis', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'axis', 'type': 'number', 'defaultValue': 0 }, | ||
{ 'start': 1, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [{ | ||
'tfName': 'num_split', | ||
'name': 'numOrSizeSplits', | ||
'type': 'number', | ||
'defaultValue': 0 | ||
}, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'num_split', | ||
'dlParamName': 'numOrSizeSplits', | ||
'type': 'number', | ||
'defaultValue': 1 | ||
} | ||
] | ||
}] | ||
}, | ||
{ | ||
'tfOpName': 'SplitV', | ||
'dlOpName': 'split', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'numOrSizeSplits', 'type': 'number[]' }, | ||
{ | ||
'tfInputIndex': 2, | ||
'dlParamName': 'axis', | ||
'type': 'number', | ||
'defaultValue': 0 | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'numOrSizeSplits', 'type': 'number[]' }, | ||
{ 'start': 2, 'name': 'axis', 'type': 'number', 'defaultValue': 0 } | ||
] | ||
@@ -260,8 +203,7 @@ }, | ||
'tfOpName': 'ScatterNd', | ||
'dlOpName': 'scatterNd', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'indices', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'values', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'shape', 'type': 'number[]' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'indices', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'values', 'type': 'tensor' }, | ||
{ 'start': 2, 'name': 'shape', 'type': 'number[]' } | ||
] | ||
@@ -271,7 +213,6 @@ }, | ||
'tfOpName': 'GatherNd', | ||
'dlOpName': 'gatherNd', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'indices', 'type': 'tensor' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'indices', 'type': 'tensor' } | ||
] | ||
@@ -281,18 +222,18 @@ }, | ||
'tfOpName': 'SparseToDense', | ||
'dlOpName': 'sparseToDense', | ||
'category': 'slice_join', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'sparseIndices', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'outputShape', 'type': 'number[]' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'sparseValues', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 3, 'dlParamName': 'defaultValue', 'type': 'tensor' }, { | ||
'tfParamName': 'validate_indices', | ||
'dlParamName': 'validateIndices', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'sparseIndices', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'outputShape', 'type': 'number[]' }, | ||
{ 'start': 2, 'name': 'sparseValues', 'type': 'tensor' }, | ||
{ 'start': 3, 'name': 'defaultValue', 'type': 'tensor' }, | ||
], | ||
'attrs': [{ | ||
'tfName': 'validate_indices', | ||
'name': 'validateIndices', | ||
'type': 'bool', | ||
'defaultValue': false, | ||
'notSupported': true | ||
} | ||
] | ||
}] | ||
} | ||
]; | ||
//# sourceMappingURL=slice_join.js.map |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,17 +18,2 @@ * @license | ||
*/ | ||
export declare const json: { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
unsupported?: undefined; | ||
} | { | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
'unsupported': boolean; | ||
})[]; | ||
}[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,26 +19,22 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [ | ||
{ | ||
'tfOpName': 'FFT', | ||
'dlOpName': 'fft', | ||
'category': 'spectral', | ||
'params': [{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }] | ||
'inputs': [{ 'start': 0, 'name': 'x', 'type': 'tensor' }] | ||
}, | ||
{ | ||
'tfOpName': 'IFFT', | ||
'dlOpName': 'ifft', | ||
'category': 'spectral', | ||
'params': [{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }] | ||
'inputs': [{ 'start': 0, 'name': 'x', 'type': 'tensor' }] | ||
}, | ||
{ | ||
'tfOpName': 'RFFT', | ||
'dlOpName': 'rfft', | ||
'category': 'spectral', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfInputIndex': 1, | ||
'dlParamName': 'fft_length', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, { | ||
'start': 1, | ||
'name': 'fft_length', | ||
'type': 'number', | ||
'unsupported': true | ||
'notSupported': true | ||
} | ||
@@ -48,10 +45,9 @@ ] | ||
'tfOpName': 'IRFFT', | ||
'dlOpName': 'irfft', | ||
'category': 'spectral', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfInputIndex': 1, | ||
'dlParamName': 'fft_length', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, { | ||
'start': 1, | ||
'name': 'fft_length', | ||
'type': 'number', | ||
'unsupported': true | ||
'notSupported': true | ||
} | ||
@@ -58,0 +54,0 @@ ] |
@@ -0,1 +1,2 @@ | ||
import { OpMapper } from '../types'; | ||
/** | ||
@@ -17,89 +18,2 @@ * @license | ||
*/ | ||
export declare const json: ({ | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
notSupported?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'notSupported': boolean; | ||
tfInputIndex?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
tfInputIndex?: undefined; | ||
notSupported?: undefined; | ||
})[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamNameDeprecated?: undefined; | ||
} | { | ||
'tfInputIndex': number; | ||
'tfParamNameDeprecated': string; | ||
'dlParamName': string; | ||
'type': string; | ||
})[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
defaultValue?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
tfInputIndex?: undefined; | ||
})[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
defaultValue?: undefined; | ||
} | { | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
'defaultValue': number; | ||
})[]; | ||
} | { | ||
'tfOpName': string; | ||
'dlOpName': string; | ||
'category': string; | ||
'params': ({ | ||
'tfInputIndex': number; | ||
'dlParamName': string; | ||
'type': string; | ||
tfParamName?: undefined; | ||
tfParamNameDeprecated?: undefined; | ||
} | { | ||
'tfParamName': string; | ||
'tfParamNameDeprecated': string; | ||
'dlParamName': string; | ||
'type': string; | ||
tfInputIndex?: undefined; | ||
})[]; | ||
})[]; | ||
export declare const json: OpMapper[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -18,16 +19,17 @@ * @license | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.json = [ | ||
{ | ||
'tfOpName': 'Cast', | ||
'dlOpName': 'cast', | ||
'category': 'transformation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'SrcT', | ||
'dlParamName': 'sdtype', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ | ||
'tfName': 'SrcT', | ||
'name': 'sdtype', | ||
'type': 'dtype', | ||
'notSupported': true | ||
}, | ||
{ 'tfParamName': 'DstT', 'dlParamName': 'dtype', 'type': 'dtype' } | ||
{ 'tfName': 'DstT', 'name': 'dtype', 'type': 'dtype' } | ||
] | ||
@@ -37,11 +39,6 @@ }, | ||
'tfOpName': 'ExpandDims', | ||
'dlOpName': 'expandDims', | ||
'category': 'transformation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfInputIndex': 1, | ||
'tfParamNameDeprecated': 'dim', | ||
'dlParamName': 'axis', | ||
'type': 'number' | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'axis', 'type': 'number' } | ||
] | ||
@@ -51,23 +48,22 @@ }, | ||
'tfOpName': 'Pad', | ||
'dlOpName': 'pad', | ||
'category': 'transformation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'padding', 'type': 'number[]' }, { | ||
'tfParamName': 'constant_value', | ||
'dlParamName': 'constantValue', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'padding', 'type': 'number[]' }, | ||
], | ||
'attrs': [{ | ||
'tfName': 'constant_value', | ||
'name': 'constantValue', | ||
'type': 'number', | ||
'defaultValue': 0 | ||
} | ||
] | ||
}] | ||
}, | ||
{ | ||
'tfOpName': 'PadV2', | ||
'dlOpName': 'pad', | ||
'category': 'transformation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'padding', 'type': 'number[]' }, { | ||
'tfInputIndex': 2, | ||
'dlParamName': 'constantValue', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'padding', 'type': 'number[]' }, { | ||
'start': 2, | ||
'name': 'constantValue', | ||
'type': 'number', | ||
@@ -80,7 +76,6 @@ 'defaultValue': 0 | ||
'tfOpName': 'Reshape', | ||
'dlOpName': 'reshape', | ||
'category': 'transformation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'shape', 'type': 'number[]' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'shape', 'type': 'number[]' } | ||
] | ||
@@ -90,21 +85,20 @@ }, | ||
'tfOpName': 'Squeeze', | ||
'dlOpName': 'squeeze', | ||
'category': 'transformation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'axis', | ||
'tfParamNameDeprecated': 'squeeze_dims', | ||
'dlParamName': 'axis', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [{ | ||
'tfName': 'axis', | ||
'tfDeprecatedName': 'squeeze_dims', | ||
'name': 'axis', | ||
'type': 'number[]' | ||
} | ||
] | ||
}] | ||
}, | ||
{ | ||
'tfOpName': 'SpaceToBatchND', | ||
'dlOpName': 'spaceToBatchND', | ||
'category': 'transformation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'blockShape', 'type': 'number[]' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'paddings', 'type': 'number[]' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'blockShape', 'type': 'number[]' }, | ||
{ 'start': 2, 'name': 'paddings', 'type': 'number[]' } | ||
] | ||
@@ -114,8 +108,7 @@ }, | ||
'tfOpName': 'BatchToSpaceND', | ||
'dlOpName': 'batchToSpaceND', | ||
'category': 'transformation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, | ||
{ 'tfInputIndex': 1, 'dlParamName': 'blockShape', 'type': 'number[]' }, | ||
{ 'tfInputIndex': 2, 'dlParamName': 'crops', 'type': 'number[]' } | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'blockShape', 'type': 'number[]' }, | ||
{ 'start': 2, 'name': 'crops', 'type': 'number[]' } | ||
] | ||
@@ -125,15 +118,9 @@ }, | ||
'tfOpName': 'DepthToSpace', | ||
'dlOpName': 'depthToSpace', | ||
'category': 'transformation', | ||
'params': [ | ||
{ 'tfInputIndex': 0, 'dlParamName': 'x', 'type': 'tensor' }, { | ||
'tfParamName': 'block_size', | ||
'dlParamName': 'blockSize', | ||
'type': 'number' | ||
}, | ||
{ | ||
'tfParamName': 'data_format', | ||
'dlParamName': 'dataFormat', | ||
'type': 'string' | ||
} | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'block_size', 'name': 'blockSize', 'type': 'number' }, | ||
{ 'tfName': 'data_format', 'name': 'dataFormat', 'type': 'string' } | ||
] | ||
@@ -140,0 +127,0 @@ } |
@@ -20,75 +20,107 @@ /** | ||
'definitions': { | ||
'Category': { | ||
'enum': string[]; | ||
'OpMapper': { | ||
'type': string; | ||
}; | ||
'OpMapper': { | ||
'properties': { | ||
'tfOpName': { | ||
'type': string; | ||
}; | ||
'category': { | ||
'$ref': string; | ||
}; | ||
'dlOpName': { | ||
'inputs': { | ||
'type': string; | ||
}; | ||
'params': { | ||
'items': { | ||
'$ref': string; | ||
}; | ||
'type': string; | ||
}; | ||
'tfOpName': { | ||
'attrs': { | ||
'type': string; | ||
}; | ||
'unsupportedParams': { | ||
'items': { | ||
'type': string; | ||
'$ref': string; | ||
}; | ||
'type': string; | ||
}; | ||
'customExecutor': { | ||
'$ref': string; | ||
}; | ||
}; | ||
'required': string[]; | ||
'additionalProperties': boolean; | ||
}; | ||
'Category': { | ||
'type': string; | ||
'enum': string[]; | ||
}; | ||
'ParamMapper': { | ||
'InputParamMapper': { | ||
'type': string; | ||
'properties': { | ||
'converter': { | ||
'name': { | ||
'type': string; | ||
}; | ||
'type': { | ||
'$ref': string; | ||
}; | ||
'defaultValue': { | ||
'anyOf': ({ | ||
'type': string; | ||
items?: undefined; | ||
} | { | ||
'type': string; | ||
'items': { | ||
'type': string; | ||
}; | ||
'type': string; | ||
} | { | ||
'type': string[]; | ||
items?: undefined; | ||
})[]; | ||
}; | ||
'dlParamName': { | ||
'notSupported': { | ||
'type': string; | ||
}; | ||
'notSupported': { | ||
'start': { | ||
'type': string; | ||
}; | ||
'tfInputIndex': { | ||
'end': { | ||
'type': string; | ||
}; | ||
'tfInputParamLength': { | ||
}; | ||
'required': string[]; | ||
'additionalProperties': boolean; | ||
}; | ||
'ParamTypes': { | ||
'type': string; | ||
'enum': string[]; | ||
}; | ||
'AttrParamMapper': { | ||
'type': string; | ||
'properties': { | ||
'name': { | ||
'type': string; | ||
}; | ||
'tfParamName': { | ||
'type': { | ||
'$ref': string; | ||
}; | ||
'defaultValue': { | ||
'anyOf': ({ | ||
'type': string; | ||
items?: undefined; | ||
} | { | ||
'type': string; | ||
'items': { | ||
'type': string; | ||
}; | ||
})[]; | ||
}; | ||
'notSupported': { | ||
'type': string; | ||
}; | ||
'tfParamNameDeprecated': { | ||
'tfName': { | ||
'type': string; | ||
}; | ||
'type': { | ||
'$ref': string; | ||
'tfDeprecatedName': { | ||
'type': string; | ||
}; | ||
}; | ||
'type': string; | ||
'required': string[]; | ||
'additionalProperties': boolean; | ||
}; | ||
'ParamTypes': { | ||
'enum': string[]; | ||
'OpExecutor': { | ||
'type': string; | ||
'additionalProperties': boolean; | ||
}; | ||
@@ -95,0 +127,0 @@ }; |
@@ -22,48 +22,77 @@ "use strict"; | ||
'definitions': { | ||
'Category': { | ||
'enum': [ | ||
'arithmetic', 'basic_math', 'control', 'convolution', 'creation', | ||
'dynamic', 'evaluation', 'image', 'graph', 'logical', 'matrices', | ||
'normalization', 'reduction', 'slice_join', 'transformation' | ||
], | ||
'type': 'string' | ||
}, | ||
'OpMapper': { | ||
'type': 'object', | ||
'properties': { | ||
'tfOpName': { 'type': 'string' }, | ||
'category': { '$ref': '#/definitions/Category' }, | ||
'dlOpName': { 'type': 'string' }, | ||
'params': { 'items': { '$ref': '#/definitions/ParamMapper' }, 'type': 'array' }, | ||
'tfOpName': { 'type': 'string' }, | ||
'unsupportedParams': { 'items': { 'type': 'string' }, 'type': 'array' } | ||
'inputs': { | ||
'type': 'array', | ||
'items': { '$ref': '#/definitions/InputParamMapper' } | ||
}, | ||
'attrs': { | ||
'type': 'array', | ||
'items': { '$ref': '#/definitions/AttrParamMapper' } | ||
}, | ||
'customExecutor': { '$ref': '#/definitions/OpExecutor' } | ||
}, | ||
'type': 'object' | ||
'required': ['tfOpName'], | ||
'additionalProperties': false | ||
}, | ||
'ParamMapper': { | ||
'Category': { | ||
'type': 'string', | ||
'enum': [ | ||
'arithmetic', 'basic_math', 'control', 'convolution', 'custom', | ||
'dynamic', 'evaluation', 'image', 'creation', 'graph', 'logical', | ||
'matrices', 'normalization', 'reduction', 'slice_join', 'spectral', | ||
'transformation' | ||
] | ||
}, | ||
'InputParamMapper': { | ||
'type': 'object', | ||
'properties': { | ||
'converter': { 'type': 'string' }, | ||
'name': { 'type': 'string' }, | ||
'type': { '$ref': '#/definitions/ParamTypes' }, | ||
'defaultValue': { | ||
'anyOf': [ | ||
{ 'items': { 'type': 'string' }, 'type': 'array' }, | ||
{ 'items': { 'type': 'number' }, 'type': 'array' }, | ||
{ 'items': { 'type': 'boolean' }, 'type': 'array' }, | ||
{ 'type': ['string', 'number', 'boolean'] } | ||
{ 'type': 'string' }, { 'type': 'array', 'items': { 'type': 'string' } }, | ||
{ 'type': 'number' }, { 'type': 'array', 'items': { 'type': 'number' } }, | ||
{ 'type': 'boolean' }, | ||
{ 'type': 'array', 'items': { 'type': 'boolean' } } | ||
] | ||
}, | ||
'dlParamName': { 'type': 'string' }, | ||
'notSupported': { 'type': 'boolean' }, | ||
'tfInputIndex': { 'type': 'number' }, | ||
'tfInputParamLength': { 'type': 'number' }, | ||
'tfParamName': { 'type': 'string' }, | ||
'tfParamNameDeprecated': { 'type': 'string' }, | ||
'type': { '$ref': '#/definitions/ParamTypes' } | ||
'start': { 'type': 'number' }, | ||
'end': { 'type': 'number' } | ||
}, | ||
'type': 'object' | ||
'required': ['name', 'start', 'type'], | ||
'additionalProperties': false | ||
}, | ||
'ParamTypes': { | ||
'type': 'string', | ||
'enum': [ | ||
'bool', 'dtype', 'number', 'number[]', 'shape', 'string', 'tensor', | ||
'tensors' | ||
], | ||
'type': 'string' | ||
} | ||
'number', 'string', 'number[]', 'bool', 'shape', 'tensor', 'tensors', | ||
'dtype' | ||
] | ||
}, | ||
'AttrParamMapper': { | ||
'type': 'object', | ||
'properties': { | ||
'name': { 'type': 'string' }, | ||
'type': { '$ref': '#/definitions/ParamTypes' }, | ||
'defaultValue': { | ||
'anyOf': [ | ||
{ 'type': 'string' }, { 'type': 'array', 'items': { 'type': 'string' } }, | ||
{ 'type': 'number' }, { 'type': 'array', 'items': { 'type': 'number' } }, | ||
{ 'type': 'boolean' }, | ||
{ 'type': 'array', 'items': { 'type': 'boolean' } } | ||
] | ||
}, | ||
'notSupported': { 'type': 'boolean' }, | ||
'tfName': { 'type': 'string' }, | ||
'tfDeprecatedName': { 'type': 'string' } | ||
}, | ||
'required': ['name', 'tfName', 'type'], | ||
'additionalProperties': false | ||
}, | ||
'OpExecutor': { 'type': 'object', 'additionalProperties': false } | ||
}, | ||
@@ -70,0 +99,0 @@ 'items': { '$ref': '#/definitions/OpMapper' }, |
@@ -41,40 +41,46 @@ "use strict"; | ||
function executeOp(node, tensorMap, context) { | ||
switch (node.category) { | ||
case 'arithmetic': | ||
return arithmetic.executeOp(node, tensorMap, context); | ||
case 'basic_math': | ||
return basicMath.executeOp(node, tensorMap, context); | ||
case 'control': | ||
return control.executeOp(node, tensorMap, context); | ||
case 'convolution': | ||
return convolution.executeOp(node, tensorMap, context); | ||
case 'creation': | ||
return creation.executeOp(node, tensorMap, context); | ||
case 'dynamic': | ||
return dynamic.executeOp(node, tensorMap, context); | ||
case 'evaluation': | ||
return evaluation.executeOp(node, tensorMap, context); | ||
case 'image': | ||
return image.executeOp(node, tensorMap, context); | ||
case 'graph': | ||
return graph.executeOp(node, tensorMap, context); | ||
case 'logical': | ||
return logical.executeOp(node, tensorMap, context); | ||
case 'matrices': | ||
return matrices.executeOp(node, tensorMap, context); | ||
case 'normalization': | ||
return normalization.executeOp(node, tensorMap, context); | ||
case 'reduction': | ||
return reduction.executeOp(node, tensorMap, context); | ||
case 'slice_join': | ||
return sliceJoin.executeOp(node, tensorMap, context); | ||
case 'spectral': | ||
return spectral.executeOp(node, tensorMap, context); | ||
case 'transformation': | ||
return transformation.executeOp(node, tensorMap, context); | ||
default: | ||
throw TypeError("Node type " + node.op + " is not implemented"); | ||
var value = (function (node, tensorMap, context) { | ||
switch (node.category) { | ||
case 'arithmetic': | ||
return arithmetic.executeOp(node, tensorMap, context); | ||
case 'basic_math': | ||
return basicMath.executeOp(node, tensorMap, context); | ||
case 'control': | ||
return control.executeOp(node, tensorMap, context); | ||
case 'convolution': | ||
return convolution.executeOp(node, tensorMap, context); | ||
case 'creation': | ||
return creation.executeOp(node, tensorMap, context); | ||
case 'dynamic': | ||
return dynamic.executeOp(node, tensorMap, context); | ||
case 'evaluation': | ||
return evaluation.executeOp(node, tensorMap, context); | ||
case 'image': | ||
return image.executeOp(node, tensorMap, context); | ||
case 'graph': | ||
return graph.executeOp(node, tensorMap, context); | ||
case 'logical': | ||
return logical.executeOp(node, tensorMap, context); | ||
case 'matrices': | ||
return matrices.executeOp(node, tensorMap, context); | ||
case 'normalization': | ||
return normalization.executeOp(node, tensorMap, context); | ||
case 'reduction': | ||
return reduction.executeOp(node, tensorMap, context); | ||
case 'slice_join': | ||
return sliceJoin.executeOp(node, tensorMap, context); | ||
case 'spectral': | ||
return spectral.executeOp(node, tensorMap, context); | ||
case 'transformation': | ||
return transformation.executeOp(node, tensorMap, context); | ||
default: | ||
throw TypeError("Node type " + node.op + " is not implemented"); | ||
} | ||
})(node, tensorMap, context); | ||
if (value instanceof Promise) { | ||
return value.then(function (data) { return [].concat(data); }); | ||
} | ||
return [].concat(value); | ||
} | ||
exports.executeOp = executeOp; | ||
//# sourceMappingURL=operation_executor.js.map |
@@ -108,3 +108,3 @@ "use strict"; | ||
name: node.name, | ||
op: mapper.dlOpName, | ||
op: node.op, | ||
category: mapper.category, | ||
@@ -115,3 +115,4 @@ inputNames: (node.input || | ||
children: [], | ||
params: {} | ||
inputParams: {}, | ||
attrParams: {} | ||
}; | ||
@@ -121,44 +122,53 @@ if (node.attr == null) { | ||
} | ||
if (mapper.params != null) { | ||
newNode.params = mapper.params.reduce(function (map, param) { | ||
var inputIndex = param.tfInputIndex; | ||
var inputParamLength = param.tfInputParamLength; | ||
var type = param.type; | ||
var value = undefined; | ||
if (inputIndex === undefined) { | ||
if (mapper.inputs != null) { | ||
newNode.inputParams = | ||
mapper.inputs.reduce(function (map, param) { | ||
map[param.name] = { | ||
type: param.type, | ||
inputIndexStart: param.start, | ||
inputIndexEnd: param.end | ||
}; | ||
return map; | ||
}, {}); | ||
} | ||
if (mapper.attrs != null) { | ||
newNode.attrParams = | ||
mapper.attrs.reduce(function (map, param) { | ||
var type = param.type; | ||
var value = undefined; | ||
switch (param.type) { | ||
case 'string': | ||
value = _this.getStringParam(node.attr, param.tfParamName, param.defaultValue); | ||
if (value === undefined && !!param.tfParamNameDeprecated) { | ||
value = _this.getStringParam(node.attr, param.tfParamNameDeprecated, param.defaultValue); | ||
value = _this.getStringParam(node.attr, param.tfName, param.defaultValue); | ||
if (value === undefined && !!param.tfDeprecatedName) { | ||
value = _this.getStringParam(node.attr, param.tfDeprecatedName, param.defaultValue); | ||
} | ||
break; | ||
case 'number': | ||
value = _this.getNumberParam(node.attr, param.tfParamName, (param.defaultValue || 0)); | ||
if (value === undefined && !!param.tfParamNameDeprecated) { | ||
value = _this.getNumberParam(node.attr, param.tfParamNameDeprecated, param.defaultValue); | ||
value = _this.getNumberParam(node.attr, param.tfName, (param.defaultValue || 0)); | ||
if (value === undefined && !!param.tfDeprecatedName) { | ||
value = _this.getNumberParam(node.attr, param.tfDeprecatedName, param.defaultValue); | ||
} | ||
break; | ||
case 'number[]': | ||
value = _this.getNumericArrayParam(node.attr, param.tfParamName, param.defaultValue); | ||
if (value === undefined && !!param.tfParamNameDeprecated) { | ||
value = _this.getNumericArrayParam(node.attr, param.tfParamNameDeprecated, param.defaultValue); | ||
value = _this.getNumericArrayParam(node.attr, param.tfName, param.defaultValue); | ||
if (value === undefined && !!param.tfDeprecatedName) { | ||
value = _this.getNumericArrayParam(node.attr, param.tfDeprecatedName, param.defaultValue); | ||
} | ||
break; | ||
case 'bool': | ||
value = _this.getBoolParam(node.attr, param.tfParamName, param.defaultValue); | ||
if (value === undefined && !!param.tfParamNameDeprecated) { | ||
value = _this.getBoolParam(node.attr, param.tfParamNameDeprecated, param.defaultValue); | ||
value = _this.getBoolParam(node.attr, param.tfName, param.defaultValue); | ||
if (value === undefined && !!param.tfDeprecatedName) { | ||
value = _this.getBoolParam(node.attr, param.tfDeprecatedName, param.defaultValue); | ||
} | ||
break; | ||
case 'shape': | ||
value = _this.getTensorShapeParam(node.attr, param.tfParamName, param.defaultValue); | ||
if (value === undefined && !!param.tfParamNameDeprecated) { | ||
value = _this.getTensorShapeParam(node.attr, param.tfParamNameDeprecated, param.defaultValue); | ||
value = _this.getTensorShapeParam(node.attr, param.tfName, param.defaultValue); | ||
if (value === undefined && !!param.tfDeprecatedName) { | ||
value = _this.getTensorShapeParam(node.attr, param.tfDeprecatedName, param.defaultValue); | ||
} | ||
break; | ||
case 'dtype': | ||
value = _this.getDtypeParam(node.attr, param.tfParamName, param.defaultValue); | ||
if (value === undefined && !!param.tfParamNameDeprecated) { | ||
value = _this.getDtypeParam(node.attr, param.tfParamNameDeprecated, param.defaultValue); | ||
value = _this.getDtypeParam(node.attr, param.tfName, param.defaultValue); | ||
if (value === undefined && !!param.tfDeprecatedName) { | ||
value = _this.getDtypeParam(node.attr, param.tfDeprecatedName, param.defaultValue); | ||
} | ||
@@ -172,6 +182,5 @@ break; | ||
} | ||
} | ||
map[param.dlParamName] = { value: value, inputIndex: inputIndex, type: type, inputParamLength: inputParamLength }; | ||
return map; | ||
}, {}); | ||
map[param.name] = { value: value, type: type }; | ||
return map; | ||
}, {}); | ||
} | ||
@@ -178,0 +187,0 @@ return newNode; |
@@ -107,3 +107,3 @@ "use strict"; | ||
name: node.name, | ||
op: mapper.dlOpName, | ||
op: node.op, | ||
category: mapper.category, | ||
@@ -114,46 +114,56 @@ inputNames: (node.input || | ||
children: [], | ||
params: {} | ||
inputParams: {}, | ||
attrParams: {} | ||
}; | ||
if (!!mapper.params) { | ||
newNode.params = mapper.params.reduce(function (map, param) { | ||
var inputIndex = param.tfInputIndex; | ||
var inputParamLength = param.tfInputParamLength; | ||
var type = param.type; | ||
var value = undefined; | ||
if (inputIndex === undefined) { | ||
if (!!mapper.inputs) { | ||
newNode.inputParams = | ||
mapper.inputs.reduce(function (map, param) { | ||
map[param.name] = { | ||
type: param.type, | ||
inputIndexStart: param.start, | ||
inputIndexEnd: param.end | ||
}; | ||
return map; | ||
}, {}); | ||
} | ||
if (!!mapper.attrs) { | ||
newNode.attrParams = | ||
mapper.attrs.reduce(function (map, param) { | ||
var type = param.type; | ||
var value = undefined; | ||
switch (param.type) { | ||
case 'string': | ||
value = _this.getStringParam(node.attr, param.tfParamName, param.defaultValue); | ||
if (value === undefined && !!param.tfParamNameDeprecated) { | ||
value = _this.getStringParam(node.attr, param.tfParamNameDeprecated, param.defaultValue); | ||
value = _this.getStringParam(node.attr, param.tfName, param.defaultValue); | ||
if (value === undefined && !!param.tfDeprecatedName) { | ||
value = _this.getStringParam(node.attr, param.tfDeprecatedName, param.defaultValue); | ||
} | ||
break; | ||
case 'number': | ||
value = _this.getNumberParam(node.attr, param.tfParamName, (param.defaultValue || 0)); | ||
if (value === undefined && !!param.tfParamNameDeprecated) { | ||
value = _this.getNumberParam(node.attr, param.tfParamNameDeprecated, param.defaultValue); | ||
value = _this.getNumberParam(node.attr, param.tfName, (param.defaultValue || 0)); | ||
if (value === undefined && !!param.tfDeprecatedName) { | ||
value = _this.getNumberParam(node.attr, param.tfDeprecatedName, param.defaultValue); | ||
} | ||
break; | ||
case 'number[]': | ||
value = _this.getNumericArrayParam(node.attr, param.tfParamName, param.defaultValue); | ||
if (value === undefined && !!param.tfParamNameDeprecated) { | ||
value = _this.getNumericArrayParam(node.attr, param.tfParamNameDeprecated, param.defaultValue); | ||
value = _this.getNumericArrayParam(node.attr, param.tfName, param.defaultValue); | ||
if (value === undefined && !!param.tfDeprecatedName) { | ||
value = _this.getNumericArrayParam(node.attr, param.tfDeprecatedName, param.defaultValue); | ||
} | ||
break; | ||
case 'bool': | ||
value = _this.getBoolParam(node.attr, param.tfParamName, param.defaultValue); | ||
if (value === undefined && !!param.tfParamNameDeprecated) { | ||
value = _this.getBoolParam(node.attr, param.tfParamNameDeprecated, param.defaultValue); | ||
value = _this.getBoolParam(node.attr, param.tfName, param.defaultValue); | ||
if (value === undefined && !!param.tfDeprecatedName) { | ||
value = _this.getBoolParam(node.attr, param.tfDeprecatedName, param.defaultValue); | ||
} | ||
break; | ||
case 'shape': | ||
value = _this.getTensorShapeParam(node.attr, param.tfParamName, param.defaultValue); | ||
if (value === undefined && !!param.tfParamNameDeprecated) { | ||
value = _this.getTensorShapeParam(node.attr, param.tfParamNameDeprecated, param.defaultValue); | ||
value = _this.getTensorShapeParam(node.attr, param.tfName, param.defaultValue); | ||
if (value === undefined && !!param.tfDeprecatedName) { | ||
value = _this.getTensorShapeParam(node.attr, param.tfDeprecatedName, param.defaultValue); | ||
} | ||
break; | ||
case 'dtype': | ||
value = _this.getDtypeParam(node.attr, param.tfParamName, param.defaultValue); | ||
if (value === undefined && !!param.tfParamNameDeprecated) { | ||
value = _this.getDtypeParam(node.attr, param.tfParamNameDeprecated, param.defaultValue); | ||
value = _this.getDtypeParam(node.attr, param.tfName, param.defaultValue); | ||
if (value === undefined && !!param.tfDeprecatedName) { | ||
value = _this.getDtypeParam(node.attr, param.tfDeprecatedName, param.defaultValue); | ||
} | ||
@@ -167,6 +177,5 @@ break; | ||
} | ||
} | ||
map[param.dlParamName] = { value: value, inputIndex: inputIndex, type: type, inputParamLength: inputParamLength }; | ||
return map; | ||
}, {}); | ||
map[param.name] = { value: value, type: type }; | ||
return map; | ||
}, {}); | ||
} | ||
@@ -173,0 +182,0 @@ return newNode; |
@@ -18,20 +18,29 @@ /** | ||
import { Tensor } from '@tensorflow/tfjs-core'; | ||
export declare type ParamTypes = 'number' | 'string' | 'number[]' | 'bool' | 'shape' | 'tensor' | 'tensors' | 'dtype'; | ||
export declare type Category = 'arithmetic' | 'basic_math' | 'control' | 'convolution' | 'dynamic' | 'evaluation' | 'image' | 'creation' | 'graph' | 'logical' | 'matrices' | 'normalization' | 'reduction' | 'slice_join' | 'spectral' | 'transformation'; | ||
import { NamedTensorsMap } from '../data/types'; | ||
import { ExecutionContext } from '../executor/execution_context'; | ||
export declare type ParamType = 'number' | 'string' | 'number[]' | 'bool' | 'shape' | 'tensor' | 'tensors' | 'dtype'; | ||
export declare type Category = 'arithmetic' | 'basic_math' | 'control' | 'convolution' | 'custom' | 'dynamic' | 'evaluation' | 'image' | 'creation' | 'graph' | 'logical' | 'matrices' | 'normalization' | 'reduction' | 'slice_join' | 'spectral' | 'transformation'; | ||
export interface ParamMapper { | ||
tfParamName?: string; | ||
tfParamNameDeprecated?: string; | ||
tfInputIndex?: number; | ||
tfInputParamLength?: number; | ||
dlParamName: string; | ||
type: ParamTypes; | ||
converter?: string; | ||
name: string; | ||
type: ParamType; | ||
defaultValue?: string | string[] | number | number[] | boolean | boolean[]; | ||
notSupported?: boolean; | ||
} | ||
export interface InputParamMapper extends ParamMapper { | ||
start: number; | ||
end?: number; | ||
} | ||
export interface AttrParamMapper extends ParamMapper { | ||
tfName?: string; | ||
tfDeprecatedName?: string; | ||
} | ||
export interface OpExecutor { | ||
(node: Node, tensorMap: NamedTensorsMap, context: ExecutionContext): Tensor | Tensor[] | Promise<Tensor | Tensor[]>; | ||
} | ||
export interface OpMapper { | ||
tfOpName: string; | ||
dlOpName: string; | ||
category: Category; | ||
params: ParamMapper[]; | ||
tfOpName?: string; | ||
category?: Category; | ||
inputs?: InputParamMapper[]; | ||
attrs?: AttrParamMapper[]; | ||
customExecutor?: OpExecutor; | ||
} | ||
@@ -44,3 +53,6 @@ export interface Node { | ||
inputs: Node[]; | ||
params: { | ||
inputParams: { | ||
[key: string]: InputParamValue; | ||
}; | ||
attrParams: { | ||
[key: string]: ParamValue; | ||
@@ -64,5 +76,7 @@ }; | ||
value?: ValueType; | ||
inputIndex?: number; | ||
inputParamLength?: number; | ||
type: ParamTypes; | ||
type: ParamType; | ||
} | ||
export interface InputParamValue extends ParamValue { | ||
inputIndexStart?: number; | ||
inputIndexEnd?: number; | ||
} |
/** @license See the LICENSE file. */ | ||
declare const version = "1.0.0-alpha2"; | ||
declare const version = "1.0.0-alpha3"; | ||
export { version }; |
@@ -5,4 +5,4 @@ "use strict"; | ||
// This code is auto-generated, do not modify this file! | ||
var version = '1.0.0-alpha2'; | ||
var version = '1.0.0-alpha3'; | ||
exports.version = version; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@tensorflow/tfjs-converter", | ||
"version": "1.0.0-alpha2", | ||
"version": "1.0.0-alpha3", | ||
"description": "Tensorflow model converter for javascript", | ||
@@ -17,6 +17,6 @@ "main": "dist/src/index.js", | ||
"peerDependencies": { | ||
"@tensorflow/tfjs-core": "1.0.0-alpha2" | ||
"@tensorflow/tfjs-core": "1.0.0-alpha3" | ||
}, | ||
"devDependencies": { | ||
"@tensorflow/tfjs-core": "1.0.0-alpha2", | ||
"@tensorflow/tfjs-core": "1.0.0-alpha3", | ||
"@types/jasmine": "~2.8.6", | ||
@@ -23,0 +23,0 @@ "@types/js-base64": "2.3.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
3317069
190
21533