3 min read

TensorFlow team has released a new version of TensorFlow.js – a browser-based JavaScript library – for training and deploying machine learning models. This new version 0.11.1 has brought notable features in their armory to ease WebGL accelerated browser-based machine learning.

TensorFlow.js is an open source JavaScript library which allows you to build machine learning models in the browser. It provides you flexible and intuitive high-level APIs to build, train and run models from scratch. This means you can run and retrain pre-existing TensorFlow and Keras models right in the browser.

Some of the noteworthy changes available in TensorFlow.js 0.11:

  • Now you can save and load tf.models using various media – Thanks to the new capabilities added
    • Browser IndexedDB
    • Browser local storage
    • HTTP requests
    • Browser file downloads and uploads

In order to know more about each medium used to save and load models in TensorFlow.js, you can refer the tutorials page.


There are a set of new features added to both TensorFlow.js Core API and TensorFlow.js Layers API:

TensorFlow.js Core API (0.8.3 ==> 0.11.0)

TensorFlow.js Core API provides low-level, hardware-accelerated linear algebra operations. It also provides an eager API for carrying out automatic differentiation.

Breaking changes

  • From now on ES5 tf-core.js bundle users will have to use symbol tf instead of tfc
  • Now you can export GPGPUContext and add getCanvas() to the WebGLBackend

Performance and development changes

  • They have optimized CPU conv2dDerInput on CPU to get 100x faster.
  • Loading quantized weight support added to reduce the model size and improve model download time.
  • New serialization infrastructure added to the core API
  • New helper methods and basic types added to support model exporting

New features added to the Core API

  • Added tf.losses.logLoss support which allows you to add a log loss term to the training procedure
  • They have also added tf.losses.cosineDistance which allows you to add a cosine-distance loss to the training procedure
  • Added tensor.round() which rounds the value of a tensor to the nearest integer, element-wise.
  • They have added tf.cumsum support which allows you to compute the cumulative sum of the tensor x along the axis.
  • They have added tf.losses.hinge_loss support which allows you to add a hinge loss to the training procedure.

For the complete list of new features, documentation changes, a plethora of bug fixes and other miscellaneous changes added to the Core API you can refer the release notes.

TensorFlow.js Layers API (0.5.2 ==> 0.6.1)

TensorFlow.js Layers API is a high-level machine learning model API built on TensorFlow.js Core. This API can be used to build, train and execute deep learning models in the browser.

Breaking changes

  • From now on, ES5 tf-core.js bundle users will have to use symbol tf instead of tfl
  • They have removed the exporting of the backend symbols
  • Changed default epochs to 1 in Model.fit () function

Feature changes

  • A new version string added to the keras_version field of JSONs from model serialization
  • They have added tf.layers.cropping2D support which allows you to crop layer for 2D input (eg: image)

For the complete list of documentation changes, bug fixes and other miscellaneous changes added to the Layers API you can refer the release notes.

Read next

LEAVE A REPLY

Please enter your comment!
Please enter your name here