@tensorflow/tfjs-converter
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -24,10 +24,8 @@ /** | ||
* ```js | ||
* const matmulOpExecutor = (node) => { | ||
* return tf.matMul( | ||
* node.inputs[0] as tfc.Tensor2D, | ||
* node.inputs[1] as tfc.Tensor2D, | ||
* node.attrs['transpose_a'] as boolean, | ||
* node.attrs['transpose_b'] as boolean); | ||
* } | ||
* tf.registerOp('MatMul', matmulOpExecutor); | ||
* const customMatmul = (node) => | ||
* tf.matMul( | ||
* node.inputs[0], node.inputs[1], | ||
* node.attrs['transpose_a'], node.attrs['transpose_b']); | ||
* | ||
* tf.registerOp('MatMul', customMatmul); | ||
* ``` | ||
@@ -34,0 +32,0 @@ * The inputs and attrs of the node object is based on the TensorFlow op |
@@ -26,10 +26,8 @@ "use strict"; | ||
* ```js | ||
* const matmulOpExecutor = (node) => { | ||
* return tf.matMul( | ||
* node.inputs[0] as tfc.Tensor2D, | ||
* node.inputs[1] as tfc.Tensor2D, | ||
* node.attrs['transpose_a'] as boolean, | ||
* node.attrs['transpose_b'] as boolean); | ||
* } | ||
* tf.registerOp('MatMul', matmulOpExecutor); | ||
* const customMatmul = (node) => | ||
* tf.matMul( | ||
* node.inputs[0], node.inputs[1], | ||
* node.attrs['transpose_a'], node.attrs['transpose_b']); | ||
* | ||
* tf.registerOp('MatMul', customMatmul); | ||
* ``` | ||
@@ -36,0 +34,0 @@ * The inputs and attrs of the node object is based on the TensorFlow op |
@@ -24,2 +24,3 @@ "use strict"; | ||
case 'Abs': | ||
case 'ComplexAbs': | ||
return [tfc.abs(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
@@ -42,2 +43,4 @@ case 'Acos': | ||
return [tfc.ceil(utils_1.getParamValue('x', node, tensorMap, context))]; | ||
case 'Complex': | ||
return [tfc.complex(utils_1.getParamValue('real', node, tensorMap, context), utils_1.getParamValue('imag', node, tensorMap, context))]; | ||
case 'Cos': | ||
@@ -44,0 +47,0 @@ return [tfc.cos(utils_1.getParamValue('x', node, tensorMap, context))]; |
@@ -27,2 +27,5 @@ "use strict"; | ||
} | ||
case 'FusedBatchNormV3': { | ||
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 'LRN': { | ||
@@ -29,0 +32,0 @@ 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))]; |
@@ -93,2 +93,23 @@ "use strict"; | ||
{ | ||
'tfOpName': 'Complex', | ||
'category': 'basic_math', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'real', 'type': 'tensor' }, | ||
{ 'start': 1, 'name': 'imag', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
}, | ||
{ | ||
'tfOpName': 'ComplexAbs', | ||
'category': 'basic_math', | ||
'inputs': [ | ||
{ 'start': 0, 'name': 'x', 'type': 'tensor' }, | ||
], | ||
'attrs': [ | ||
{ 'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true } | ||
] | ||
}, | ||
{ | ||
'tfOpName': 'Cos', | ||
@@ -95,0 +116,0 @@ 'category': 'basic_math', |
@@ -71,2 +71,27 @@ "use strict"; | ||
{ | ||
'tfOpName': 'FusedBatchNormV3', | ||
'category': 'normalization', | ||
'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', | ||
'defaultValue': 0.001 | ||
}, | ||
{ | ||
'tfName': 'data_format', | ||
'name': 'dataFormat', | ||
'type': 'string', | ||
'notSupported': true | ||
} | ||
] | ||
}, | ||
{ | ||
'tfOpName': 'LRN', | ||
@@ -73,0 +98,0 @@ 'category': 'normalization', |
/** @license See the LICENSE file. */ | ||
declare const version = "1.2.1"; | ||
declare const version = "1.2.2"; | ||
export { version }; |
@@ -5,4 +5,4 @@ "use strict"; | ||
// This code is auto-generated, do not modify this file! | ||
var version = '1.2.1'; | ||
var version = '1.2.2'; | ||
exports.version = version; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@tensorflow/tfjs-converter", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Tensorflow model converter for javascript", | ||
@@ -17,6 +17,6 @@ "main": "dist/src/index.js", | ||
"peerDependencies": { | ||
"@tensorflow/tfjs-core": "1.2.1" | ||
"@tensorflow/tfjs-core": "1.2.2" | ||
}, | ||
"devDependencies": { | ||
"@tensorflow/tfjs-core": "1.2.1", | ||
"@tensorflow/tfjs-core": "1.2.2", | ||
"@types/jasmine": "~2.8.6", | ||
@@ -61,2 +61,3 @@ "@types/long": "~3.0.32", | ||
"test-ci": "yarn build && yarn lint && yarn run-browserstack", | ||
"test-snippets": "ts-node ./scripts/test_snippets.ts", | ||
"run-browserstack": "karma start --singleRun --browsers='bs_firefox_mac,bs_chrome_mac' --reporters='dots,karma-typescript,BrowserStack'", | ||
@@ -63,0 +64,0 @@ "lint": "tslint -p . -t verbose", |
@@ -29,10 +29,8 @@ | ||
* ```js | ||
* const matmulOpExecutor = (node) => { | ||
* return tf.matMul( | ||
* node.inputs[0] as tfc.Tensor2D, | ||
* node.inputs[1] as tfc.Tensor2D, | ||
* node.attrs['transpose_a'] as boolean, | ||
* node.attrs['transpose_b'] as boolean); | ||
* } | ||
* tf.registerOp('MatMul', matmulOpExecutor); | ||
* const customMatmul = (node) => | ||
* tf.matMul( | ||
* node.inputs[0], node.inputs[1], | ||
* node.attrs['transpose_a'], node.attrs['transpose_b']); | ||
* | ||
* tf.registerOp('MatMul', customMatmul); | ||
* ``` | ||
@@ -39,0 +37,0 @@ * The inputs and attrs of the node object is based on the TensorFlow op |
@@ -32,2 +32,3 @@ /** | ||
case 'Abs': | ||
case 'ComplexAbs': | ||
return [tfc.abs( | ||
@@ -60,2 +61,6 @@ getParamValue('x', node, tensorMap, context) as tfc.Tensor)]; | ||
getParamValue('x', node, tensorMap, context) as tfc.Tensor)]; | ||
case 'Complex': | ||
return [tfc.complex( | ||
getParamValue('real', node, tensorMap, context) as tfc.Tensor, | ||
getParamValue('imag', node, tensorMap, context) as tfc.Tensor)]; | ||
case 'Cos': | ||
@@ -62,0 +67,0 @@ return [tfc.cos( |
@@ -41,2 +41,11 @@ /** | ||
} | ||
case 'FusedBatchNormV3': { | ||
return [tfc.batchNorm( | ||
getParamValue('x', node, tensorMap, context) as tfc.Tensor, | ||
getParamValue('mean', node, tensorMap, context) as tfc.Tensor, | ||
getParamValue('variance', node, tensorMap, context) as tfc.Tensor, | ||
getParamValue('offset', node, tensorMap, context) as tfc.Tensor, | ||
getParamValue('scale', node, tensorMap, context) as tfc.Tensor, | ||
getParamValue('epsilon', node, tensorMap, context) as number)]; | ||
} | ||
case 'LRN': { | ||
@@ -43,0 +52,0 @@ return [tfc.localResponseNormalization( |
@@ -94,2 +94,23 @@ import {OpMapper} from '../types'; | ||
{ | ||
'tfOpName': 'Complex', | ||
'category': 'basic_math', | ||
'inputs': [ | ||
{'start': 0, 'name': 'real', 'type': 'tensor'}, | ||
{'start': 1, 'name': 'imag', 'type': 'tensor'}, | ||
], | ||
'attrs': [ | ||
{'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true} | ||
] | ||
}, | ||
{ | ||
'tfOpName': 'ComplexAbs', | ||
'category': 'basic_math', | ||
'inputs': [ | ||
{'start': 0, 'name': 'x', 'type': 'tensor'}, | ||
], | ||
'attrs': [ | ||
{'tfName': 'T', 'name': 'dtype', 'type': 'dtype', 'notSupported': true} | ||
] | ||
}, | ||
{ | ||
'tfOpName': 'Cos', | ||
@@ -96,0 +117,0 @@ 'category': 'basic_math', |
@@ -72,2 +72,27 @@ import {OpMapper} from '../types'; | ||
{ | ||
'tfOpName': 'FusedBatchNormV3', | ||
'category': 'normalization', | ||
'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', | ||
'defaultValue': 0.001 | ||
}, | ||
{ | ||
'tfName': 'data_format', | ||
'name': 'dataFormat', | ||
'type': 'string', | ||
'notSupported': true | ||
} | ||
] | ||
}, | ||
{ | ||
'tfOpName': 'LRN', | ||
@@ -74,0 +99,0 @@ 'category': 'normalization', |
/** @license See the LICENSE file. */ | ||
// This code is auto-generated, do not modify this file! | ||
const version = '1.2.1'; | ||
const version = '1.2.2'; | ||
export {version}; |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2464252
246
23698
0