2021-05-25 14:58:20 +02:00
|
|
|
/**
|
|
|
|
* Creates tfjs bundle used by Human browser build target
|
|
|
|
*/
|
2020-11-10 14:57:39 +01:00
|
|
|
|
2020-11-18 14:26:28 +01:00
|
|
|
// simplified
|
2021-04-08 18:10:15 +02:00
|
|
|
// { modules: 1250, moduleBytes: 4013323, imports: 7, importBytes: 2255, outputBytes: 2991826, outputFiles: 'dist/tfjs.esm.js' }
|
2020-12-13 00:34:30 +01:00
|
|
|
// export * from '@tensorflow/tfjs/dist/index.js';
|
|
|
|
// export * from '@tensorflow/tfjs-backend-wasm';
|
2020-11-18 14:26:28 +01:00
|
|
|
|
|
|
|
// modular
|
2021-04-08 18:10:15 +02:00
|
|
|
// { modules: 1253, moduleBytes: 4029357, imports: 7, importBytes: 2285, outputBytes: 2998298, outputFiles: 'dist/tfjs.esm.js' }
|
2020-11-18 14:26:28 +01:00
|
|
|
|
|
|
|
// get versions of all packages.
|
2021-02-17 16:22:38 +01:00
|
|
|
import * as packageBundle from '@tensorflow/tfjs/package.json';
|
|
|
|
import * as packageCore from '@tensorflow/tfjs-core/package.json';
|
|
|
|
import * as packageData from '@tensorflow/tfjs-data/package.json';
|
|
|
|
import * as packageLayers from '@tensorflow/tfjs-layers/package.json';
|
|
|
|
import * as packageConverter from '@tensorflow/tfjs-converter/package.json';
|
2020-11-18 14:26:28 +01:00
|
|
|
// for backends, get version from source so it can register backend during import
|
|
|
|
import { version_cpu } from '@tensorflow/tfjs-backend-cpu/dist/index.js';
|
|
|
|
import { version_webgl } from '@tensorflow/tfjs-backend-webgl/dist/index.js';
|
|
|
|
import { version_wasm } from '@tensorflow/tfjs-backend-wasm/dist/index.js';
|
|
|
|
|
2021-04-08 18:10:15 +02:00
|
|
|
// export all - compiled
|
2020-11-18 14:26:28 +01:00
|
|
|
export * from '@tensorflow/tfjs-core/dist/index.js';
|
|
|
|
export * from '@tensorflow/tfjs-layers/dist/index.js';
|
|
|
|
export * from '@tensorflow/tfjs-converter/dist/index.js';
|
|
|
|
export * as data from '@tensorflow/tfjs-data/dist/index.js';
|
|
|
|
export * from '@tensorflow/tfjs-backend-cpu/dist/index.js';
|
|
|
|
export * from '@tensorflow/tfjs-backend-webgl/dist/index.js';
|
|
|
|
export * from '@tensorflow/tfjs-backend-wasm/dist/index.js';
|
|
|
|
|
2021-04-08 18:10:15 +02:00
|
|
|
// export all - sources
|
|
|
|
/*
|
|
|
|
export * from '@tensorflow/tfjs-core/src/index';
|
|
|
|
export * from '@tensorflow/tfjs-layers/src/index';
|
|
|
|
export * from '@tensorflow/tfjs-converter/src/index';
|
|
|
|
export * as data from '@tensorflow/tfjs-data/src/index';
|
|
|
|
export * from '@tensorflow/tfjs-backend-cpu/src/index';
|
|
|
|
export * from '@tensorflow/tfjs-backend-webgl/src/index';
|
|
|
|
export * from '@tensorflow/tfjs-backend-wasm/src/index';
|
|
|
|
*/
|
|
|
|
|
2020-11-18 14:26:28 +01:00
|
|
|
// export versions
|
|
|
|
export const version = {
|
2021-04-08 18:10:15 +02:00
|
|
|
tfjs: packageBundle?.version || undefined,
|
|
|
|
'tfjs-core': packageCore?.version || undefined,
|
|
|
|
'tfjs-data': packageData?.version || undefined,
|
|
|
|
'tfjs-layers': packageLayers?.version || undefined,
|
|
|
|
'tfjs-converter': packageConverter?.version || undefined,
|
|
|
|
'tfjs-backend-cpu': version_cpu || undefined,
|
|
|
|
'tfjs-backend-webgl': version_webgl || undefined,
|
|
|
|
'tfjs-backend-wasm': version_wasm || undefined,
|
2020-11-18 14:26:28 +01:00
|
|
|
};
|
2021-04-08 18:10:15 +02:00
|
|
|
// export const version = {};
|