Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tensorflow/tfjs-converter

Package Overview
Dependencies
Maintainers
13
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tensorflow/tfjs-converter - npm Package Compare versions

Comparing version 0.8.1 to 0.8.2

dist/src/load_test.js.map

5

dist/src/index.d.ts

@@ -0,5 +1,8 @@

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>;
export declare function loadFrozenModel(modelUrl: string, weightsManifestUrl?: string, requestOption?: RequestInit, onProgress?: Function): Promise<FrozenModel>;
export declare function loadGraphModel(modelUrl: string, options?: io.LoadOptions): Promise<FrozenModel>;

40

dist/src/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tfjs_core_1 = require("@tensorflow/tfjs-core");
var frozen_model_1 = require("./executor/frozen_model");

@@ -8,2 +9,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");

@@ -13,9 +16,40 @@ exports.FrozenModelJSON = frozen_model_json_2.FrozenModel;

exports.version_converter = version_1.version;
function loadFrozenModel(modelUrl, weightsManifestUrl, requestOption) {
function loadFrozenModel(modelUrl, weightsManifestUrl, requestOption, onProgress) {
tfjs_core_1.deprecationWarn('tf.loadFrozenModel() is going away. ' +
'Use tf.loadGraphModel() instead, and note the positional argument changes.');
if (modelUrl && modelUrl.endsWith('.json')) {
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 (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;
}
function loadGraphModel(modelUrl, options) {
if (options === void 0) { options = {}; }
if (options == null) {
options = {};
}
if (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 (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,2 +0,2 @@

declare const version = "0.8.1";
declare const version = "0.8.2";
export { version };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var version = '0.8.1';
var version = '0.8.2';
exports.version = version;
//# sourceMappingURL=version.js.map
{
"name": "@tensorflow/tfjs-converter",
"version": "0.8.1",
"version": "0.8.2",
"description": "Tensorflow model converter for javascript",

@@ -17,6 +17,6 @@ "main": "dist/src/index.js",

"peerDependencies": {
"@tensorflow/tfjs-core": "0.15.1"
"@tensorflow/tfjs-core": "0.15.2"
},
"devDependencies": {
"@tensorflow/tfjs-core": "0.15.1",
"@tensorflow/tfjs-core": "0.15.2",
"@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 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc