@tensorflow/tfjs-converter
Advanced tools
Comparing version 0.6.2 to 0.6.4
@@ -45,2 +45,7 @@ "use strict"; | ||
} | ||
case 'prod': { | ||
var axis = utils_1.getParamValue('axis', node, tensorMap, context); | ||
var keepDims = utils_1.getParamValue('keepDims', node, tensorMap, context); | ||
return [tfc.prod(utils_1.getParamValue('x', node, tensorMap, context), axis, keepDims)]; | ||
} | ||
default: | ||
@@ -47,0 +52,0 @@ throw TypeError("Node type " + node.op + " is not implemented"); |
@@ -81,4 +81,17 @@ "use strict"; | ||
] | ||
}, | ||
{ | ||
'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' | ||
} | ||
] | ||
} | ||
]; | ||
//# sourceMappingURL=reduction.js.map |
@@ -1,2 +0,2 @@ | ||
declare const version = "0.6.2"; | ||
declare const version = "0.6.4"; | ||
export { version }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var version = '0.6.2'; | ||
var version = '0.6.4'; | ||
exports.version = version; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@tensorflow/tfjs-converter", | ||
"version": "0.6.2", | ||
"version": "0.6.4", | ||
"description": "Tensorflow model converter for javascript", | ||
@@ -17,6 +17,6 @@ "main": "dist/src/index.js", | ||
"peerDependencies": { | ||
"@tensorflow/tfjs-core": "~0.13.2" | ||
"@tensorflow/tfjs-core": "~0.13.6" | ||
}, | ||
"devDependencies": { | ||
"@tensorflow/tfjs-core": "~0.13.2", | ||
"@tensorflow/tfjs-core": "~0.13.6", | ||
"@types/jasmine": "~2.8.6", | ||
@@ -23,0 +23,0 @@ "@types/node-fetch": "1.6.9", |
@@ -127,11 +127,6 @@ [![Build Status](https://travis-ci.org/tensorflow/tfjs-converter.svg?branch=master)](https://travis-ci.org/tensorflow/tfjs-converter) | ||
1. Install the tfjs-converter npm package | ||
Instantiate the [FrozenModel class](./src/executor/frozen_model.ts) and run inference. | ||
`yarn add @tensorflow/tfjs-converter` or `npm install @tensorflow/tfjs-converter` | ||
2. Instantiate the [FrozenModel class](./src/executor/frozen_model.ts) and run inference. | ||
```typescript | ||
import * as tf from '@tensorflow/tfjs'; | ||
import {loadFrozenModel} from '@tensorflow/tfjs-converter'; | ||
@@ -141,3 +136,3 @@ const MODEL_URL = 'https://.../mobilenet/tensorflowjs_model.pb'; | ||
const model = await loadFrozenModel(MODEL_URL, WEIGHTS_URL); | ||
const model = await tf.loadFrozenModel(MODEL_URL, WEIGHTS_URL); | ||
const cat = document.getElementById('cat'); | ||
@@ -164,3 +159,3 @@ model.execute({input: tf.fromPixels(cat)}); | ||
Therefore, you can load the same frozen model from local file system into | ||
a Node.js program running TensorFlow.js. This is done by calling `laodFrozenModel` with the path | ||
a Node.js program running TensorFlow.js. This is done by calling `loadFrozenModel` with the path | ||
to the model files: | ||
@@ -167,0 +162,0 @@ |
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
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
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
2743142
17138
272
4