Breaking changes
This release contains a number of breaking changes, details of which are listed below, but at a high level these are some of the major changes in this release:
- We have removed the previously deprecated '*Strict' variants of ops. e.g. divStrict and mulStrict.
- If you are using tfjs-core directly (and not a higher level package like tfjs or tfjs-layers): gradients are no longer available without an explicit import, and the chaining api on tensors is now opt-in (requires an explicit import)
Notable additions:
-
We now ship flat esm 'bundles'. E.g. https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@3.0.0/dist/tf.fesm.min.js, this gives you many of the benefits of ES modules but can be loaded in one request in a browser.
-
We are introducing a workflow for shipping smaller bundles to browsers. Changes in TensorFlow.js 3.0 enable improved tree-shaking, and we are also introducing a CLI tool to create custom TensorFlow.js modules to feed into your bundling process. Read more about this feature here. 🔗
Read our guide to upgrading to 3.0 here. 🔗
Core (2.8.5 ==> 3.0.0)
Features
Breaking changes
- remove ops from backend interface (#4470).
- remove auto registration of gradients in core (#4422).
- remove default registration of chaining api (#4413).
- remove strict variants of ops (#4412).
Bug fixes
- Fix memory leak for complex tensors (#4563).
Misc
Data (2.8.5 ==> 3.0.0)
Features
- add fesm browser builds to packages (#4471).
Misc
- Update lockfiles branch tfjs_3.0.0_lockfiles lock files. (#4598).
- Update monorepo to 3.0.0. (#4597).
Layers (2.8.5 ==> 3.0.0)
Features
- add fesm browser builds to packages (#4471).
Misc
Converter (2.8.5 ==> 3.0.0)
Features
- add fesm browser builds to packages (#4471).
Misc
Node (2.8.5 ==> 3.0.0)
Misc
Wasm (2.8.5 ==> 3.0.0)
Features
- add fesm browser builds to packages (#4471).
Misc
- Fix WASM JS script not working after minification (#4569) (#4562).
- Update monorepo to 3.0.0. (#4597).
Cpu (2.8.5 ==> 3.0.0)
Features
- add fesm browser builds to packages (#4471).
Bug fixes
- Fix memory leak for complex tensors (#4563).
Misc
- Update monorepo to 3.0.0. (#4597).
Webgl (2.8.5 ==> 3.0.0)
Features
- add fesm browser builds to packages (#4471).
Bug fixes
- Fix memory leak for complex tensors (#4563).
Misc
- Update monorepo to 3.0.0. (#4597).