human/tfjs/tf-browser.ts

49 lines
2.1 KiB
TypeScript
Raw Normal View History

2021-05-25 14:58:20 +02:00
/**
* Creates tfjs bundle used by Human browser build target
2021-06-07 01:00:34 +02:00
* @external
2021-05-25 14:58:20 +02:00
*/
2021-06-06 18:58:06 +02:00
// get versions of all packages
2021-06-07 01:00:34 +02:00
import { version as tfjsVersion } from '@tensorflow/tfjs/package.json';
import { version as tfjsCoreVersion } from '@tensorflow/tfjs-core/package.json';
import { version as tfjsDataVersion } from '@tensorflow/tfjs-data/package.json';
import { version as tfjsLayersVersion } from '@tensorflow/tfjs-layers/package.json';
import { version as tfjsConverterVersion } from '@tensorflow/tfjs-converter/package.json';
import { version as tfjsBackendCPUVersion } from '@tensorflow/tfjs-backend-cpu/package.json';
import { version as tfjsBackendWebGLVersion } from '@tensorflow/tfjs-backend-webgl/package.json';
import { version as tfjsBackendWASMVersion } from '@tensorflow/tfjs-backend-wasm/package.json';
2021-06-06 18:58:06 +02:00
2021-08-12 00:59:02 +02:00
// export all from sources
2021-06-07 02:34:29 +02:00
// requires treeShaking:ignore-annotations due to tfjs misconfiguration
/*
2021-04-08 18:10:15 +02:00
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';
*/
2021-08-12 00:59:02 +02:00
// export all from build
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-08-12 00:59:02 +02:00
// export * from '@tensorflow/tfjs-backend-webgpu/dist/index.js'; // experimental
2020-11-18 14:26:28 +01:00
// export versions
export const version = {
2021-06-07 01:00:34 +02:00
tfjs: tfjsVersion,
'tfjs-core': tfjsCoreVersion,
'tfjs-data': tfjsDataVersion,
'tfjs-layers': tfjsLayersVersion,
'tfjs-converter': tfjsConverterVersion,
'tfjs-backend-cpu': tfjsBackendCPUVersion,
'tfjs-backend-webgl': tfjsBackendWebGLVersion,
'tfjs-backend-wasm': tfjsBackendWASMVersion,
2020-11-18 14:26:28 +01:00
};