Skip to content

Releases: tensorflow/tfjs

1.4.0

11 Dec 20:38
da343c1
Compare
Choose a tag to compare

High-level additions

  • Kernel modularization has begun! This will not affect any code today but in
    the future we'll add support for dropping code for kernels not used for your
    model.
  • The WebAssembly backend is now on NPM in alpha. You can check out details in the
    README (here)[https://github.com/tensorflow/tfjs/tree/master/tfjs-backend-wasm].
    We're not listing all the WASM PRs here yet, this will happen with the first non-alpha
    release.

Core (1.3.0 ==> 1.4.0)

Features

  • [WASM] Add resizeBilinear kernel. (#2436).
  • [WASM] Add ArgMax kernel (#2433).
  • [WASM] Add relu, relu6 kernels. (#2432).
  • [core, wasm] Modularize FromPixels and make it work for the w… (#2429).
  • [WASM] Fuse relu, relu6, prelu activations for conv2d. Add fuse… (#2424).
  • [WASM] Add FloorDiv used by PoseNet (#2426).
  • tf.linalg.bandPart (#2226). Thanks, @DirkToewe.
  • tf.broadcastTo (#2238). Thanks, @DirkToewe.
  • [WASM] Add NonMaxSuppressionV3 (#2414).
  • [WASM] Add AvgPool kernel. (#2411).
  • [core] Do not fail if half float extension not found and we are… (#2410).
  • [WASM] Add Addn used by MobileNet (#2408).
  • [WASM] Add maxPool kernel. (#2396).
  • [WASM] Add ClipByValue (#2405).
  • [WASM] Add PadV2 kernel (#2404).
  • [WASM] Add DepthwiseConv2dNative (#2374).
  • added metadata to the model artifacts on the loaders (#2392).
  • [WASM] Add FusedConv2D which only supports fusing bias. (#2356).
  • [WASM] Add CropAndResize kernel. (#2307).
  • [core]Add divNoNan op (#2320).
  • [WASM] Add Conv2D that calls into xnn pack. (#2283).
  • [WASM] Add Concat and Transpose kernels (#2303).
  • [WASM] Add min / max kernels. (#2289).
  • [WASM] Add batchnorm kernel. (#2264).
  • [WASM] Add Slice and Square kernels (#2269).

Bug fixes

  • [WASM] Support integer inputs for bilinear resizing and crop an… (#2480).
  • [core] Relax fusing logic. (#2422).
  • [Core] Fix bug with printing complex64 numbers. (#2347).
  • [WASM] Transpose the filter of the convolution before calling x… (#2344).
  • [Core] Fix bug with WEBGL_PACK=false and uploading packed tensor (#2291).
  • [Core] Fix bug with pointwise conv2d with packing (#2290).

Development

  • [core] Rename fused ops for internal scopeName tracking. (#2417).
  • fix padding_test.ts & 'for .. in' to 'for .. of' (#2388). Thanks, @karikera.
  • Revert "[Core] Update to TypeScript 3.6.3. " (#2376) (#2355).
  • [Core] Update to TypeScript 3.6.3. (#2355).
  • [WASM] Add a hierarchical test spec. (#2305).
  • [Core] Test WEBGL_PACK=false on CI (#2294).

Misc

  • Add cloud func to sync RN test app to browserStack
  • remove SavedModelTensorInfo, use ModelTensorInfo (#2379).
  • [tfjs-core/tfjs-react-native] run core unit tests in react-native

Data (1.3.0 ==> 1.4.0)

Layers (1.3.0 ==> 1.4.0)

Features

  • [layers] Add masking support to tf.layers.bidirectional() (#2371).
  • [layers] Add SpatialDropout1D Layer (#2369).

Bug fixes

  • [layers] Properly support channelsFirst dataFormat in Flatten layer (#2346).

Development

  • fix padding_test.ts & 'for .. in' to 'for .. of' (#2388). Thanks, @karikera.

Misc

  • Update layers integration tests to 1.3.0 (#2282).

Converter (1.3.0 ==> 1.4.0)

Features

  • support fused matmul (#2462).
  • support FusedDepthwiseConv2dNative op (#2446).
  • add support to fused depthwise conv2d (#2439).
  • Support GraphModel execution with SignatureDef keys (#2393).
  • [converter] Add support for op DivNoNan (#2343).

Breaking changes

  • the tensorflow cpu pip fails on mac (#2389).

Bug fixes

  • [converter] Fix mobilenet conversion problem (#2468).
  • enable quantization for tfhub modules (#2466).
  • add output format auto fill for frozen model and required param check (#2434).
  • the tensorflow cpu pip fails on mac (#2389).
  • do not quantize int32 tensors (#2368).
  • add output for noop and tensorArrayExit, this allows child now with control dep to proceed (#2312).
  • fix the versions missing from the model topology json (#2306).
  • clean the unused control flow input nodes from the graph (#2287).

Performance

  • support fused matmul (#2462).
  • [converter] Fold conv/depthwiseconv + add + batchnorm (#2463).

Misc

  • move signature def to userDefinedMetadata section (#2381).
  • fix the Concat and ConcatV2 op when the input tensor list length mismatch with the attribute param N (#2352).
  • add signature def to model.json (#2326).
  • added support prelu op (#2333).
  • remove the nodes that are skipped during batch norm folding for control node inputs (#2337).
  • rely on only the tensorflow cpu pip (#2325).
  • Fix g3 errors (#2311).
  • fix g3 errors (#2310).
  • sync g3 change to github (#2308).
  • replace the weights node name with scaled weights node (#2284).
  • move the prelu fusing logic after grappler optimization (#2234).

Node (1.3.0 ==> 1.4.0)

Features

  • [node] Add node n-api version 5 for new node releases (#2438).
  • [node] Add SavedModel execution (#2336).
  • [tfjs-node] Add SavedModel signatureDef loading and deleting API (#2217).

Bug fixes

  • [node] Fix typo when parsing string in c bindings (#2435).
  • Fix C++ char array creation syntax. (#2406).

Development

  • [node] Add node n-api version 5 for new node releases (#2438).
  • [node] Add SavedModel execution (#2336).
  • [node] Use ModelTensorInfo when read SavedModel (#2353).
  • [node] Add divnonan in tfjs-node (#2351).
  • [node] Add prep-gpu for windows system (#2334).
  • simplify install script, remove dependency to yarn (#2340). Thanks, @valette.

Documentation

  • add raspberry-pi doc (#2444).

Misc

  • [node] Depend on latest core (#2496).

tfjs-react-native-v0.1.0-alpha.2

03 Sep 19:12
c70a38c
Compare
Choose a tag to compare

We are very excited to announce the alpha release of TensorFlow.js for React Native. This brings all tensorflow.js capabilities to native apps written in react native. You can install the package from npm and setup instructions are also available on GitHub.

This platform package:

  • Supports both inference and training.
  • Has GPU support with WebGL via expo-gl.
  • Has support for loading models from the web, AsyncStorage, and models that are included in the app bundle.
  • Has support for saving models to AsyncStorage.

We welcome your feedback to help shape priorities for the general launch of this package. We also welcome developers familiar with React Native who are interested in getting involved in the future development of this library.

Looking forward to seeing what you build!

1.1.0

24 Apr 15:41
ace464f
Compare
Choose a tag to compare

High-level additions

  • HTTP requests for models is now stable in browser / Node.js. You can use tf.util.fetch() for cross-platform fetch.
  • Layers new layers: Conv3D, Noise
  • Started development on a WebGPU backend. This is a preliminary prototype and will not be added to tfjs-core until it is stable and lands in all browsers.

Core (v1.0.1 ==> v1.1.0)

Features

  • Upgrade and typify @webgpu/shaderc, add @webgpu/types (#1679).
  • Add WebGPU backend. (#1676).
  • Add tf.util.fetch. (#1663).
  • implement isNaN, isInf, isFinite (#1523). Thanks, @AndreasMadsen.
  • use the env.global for looking up fetch method (#1544).
  • Support complex type in onesLike. (#1609). Thanks, @Lewuathe.

Bug fixes

  • Don't register the webgl backend outside the browser. (#1662).
  • Revive packed division - add out of bounds check. (#1660).
  • Fix a bug with slice in webgl backend (#1655).
  • Fix windows tests and enable browserstack on windows (#1651).
  • Fix integer division on windows (D3D) (#1646).
  • Make the save function in a gradient be a Tensor[] instead of a NamedTensorMap (#1644).
  • Save tensor x in forward mode when zerosLike(x) is used in backward mode (#1636).
  • Export types used in tfjs-data (#1626).
  • Improve disposal of tensors during training (#1604).

Performance

  • Optimize addN op by the multiple upload of textures (#1538). Thanks, @Lewuathe.
  • Revive packed division - add out of bounds check. (#1660).
  • implement isNaN, isInf, isFinite (#1523). Thanks, @AndreasMadsen.
  • Modify im2col to use packed texture inputs. (#1640).
  • Speedup the WebGL tests by 2.5x (#1625).
  • Packed reverse (#1617). Thanks, @jgartman.
  • Improve disposal of tensors during training (#1604).
  • Optimize tf.tidy() and tf.keep(). (#1621).

Development

  • Add nightly cloud build (#1674).
  • Add a script to measure the bundle size. (#1666).
  • Update rollup to latest and add ability to visualize bundle (#1668).
  • Make build logs viewable for those who join our mailing list (#1661).
  • Remove travis (replaced by Cloud Build) (#1658).
  • Enable Google Cloud Build (#1657).
  • Speedup the WebGL tests by 2.5x (#1625).
  • Don't publish src/**/*_test.ts files on NPM. (#1631).
  • Speedup build and CI testing (#1624).

Documentation

  • scatterND doc fix (#1601). Thanks, @jgartman.
  • Add namespace util for the util.ts public methods. (#1654).

Misc

  • Fix the nightly script (use the imported exec function) (#1677).
  • Further modularize unit tests. (#1665).
  • Upgrade rollup-plugin-visualizer version (#1672).
  • Move rollup-plugin-visualizer as an optional dep (#1669).
  • Remove backend.setDataMover (#1664).
  • Refactor environment, make engine the root global singleton. (#1649).
  • Move the python code for browserHTTPRequest to a GitHub gist (#1652).
  • Add a bazel TS build (#1650). Thanks, @alexeagle.
  • Remove paging from the WebGL backend (#1647).
  • Make the save function in a gradient be a Tensor[] instead of a NamedTensorMap (#1644).
  • Remove redundant break (#1642). Thanks, @rkinabhi.
  • support begin, end and strides with length smaller than the input rank (#1622).
  • Clean up : update webgl cropAndResize code for readability (#1638). Thanks, @piercus.
  • Add ENV.findBackendFactory() to be used by test utils (#1635).
  • Fix a bug in shader compiler with zero-sized tensors (#1632).
  • adds error checking for tf.Buffer.get(outOfRangeLocation) (#1630).

Data (v1.0.1 ==> v1.1.0)

Bug fixes

  • Remove usage of @tensorflow/tfjs-core/dist (#169).

Development

  • Change test test setup to match new API of core. (#176).
  • Add Cloud Build integration tests (#180).
  • Remove OS X testing from travis, only test on browserstack on node 10. (#179).
  • Remove firefox from local testing to speed up local dev. (#177).
  • Don't publish _test.ts files on NPM. (#164).
  • Do not ignore src/ when publishing NPM (#157). Thanks, @huan.

Documentation

  • Update dataset.mapAsync to use mapAsync (#172).

Misc

  • Make seedrandom peerDependency and cleanup up node util.isPrimitive (#173).
  • Update tests to use tf.data.generator (#168).
  • Update documentations of tf.data.csv() (#162).

Layers (v1.0.1 ==> v1.1.0)

Features

Bug fixes

  • Fix an bug in which the output of a stateful RNN layer was incorrect disposed by the executor. [Fix a bug in stateful RNN state memory management] (#520).
  • Fix improper template litteral in topology.ts (#514). Thanks, @FremyCompany.
  • VarianceScaling initializer: Fix default arg values (#505).
  • L1 and L2 are functions, not classes, and are serialized as L1L2 (#507).
  • Allow null(None in Python) in Shape (#492). Thanks, @huan.
  • Fix l2Normalize rank error in epsilon-flooring of sum (#499). Thanks, @FremyCompany.

Performance

  • Call fused matMul in core whenever possible for performance. (#397).

Development

  • Add unit tests for Masking layer (#526).
  • Add Cloud Build integration testing (#527).
  • Remove integration/benchmarks in favor of new code in tfjs union (#522).
  • [tfjs2keras test]: Enable --dev --tfkeras option (#524).
  • [tfjs2keras test]: Add test against tf.keras (#523).
  • Remove firefox from local testing. (#515).
  • Fix typing by using TensorArrayWithArgs (#511).
  • Don't publish _test.ts files on NPM. (#500).

Documentation

Read more

1.0.0

06 Mar 22:41
e32ac14
Compare
Choose a tag to compare

TensorFlow.js 1.0

TensorFlow.js 1.0 has been released!

With this release, we are aiming to have API stability guarantees and performance wins. For the most part, the breaking changes listed here are minor and should be relatively simple to migrate to new APIs.

Performance

TensorFlow.js 1.0 brings major performance gains on common machine learning models. Here is a graph of the performance gains of TensorFlow.js 1.0 versus last year in June 2018:

image

Features

  • Tensor.array() and Tensor.arraySync() have been added. These are similar to Tensor.data() but return deeply nested arrays with the same logical shape as the original tf.Tensor.

Breaking changes

  • Graphs converted from TensorFlow now generate JSON graphs (model.json). Any protocol buffer graphs with the extension .pb are now deprecated. You can convert .pb graphs to .json graphs with the pb2json NPM script in the tensorflow/tfjs-converter repository.
  • tf.loadModel is deleted. Please use tf.loadLayersModel instead.
  • tf.loadFrozenModel is deleted. Please use tf.loadGraphModel instead.
  • tf.Model has been renamed tf.LayersModel.
  • tf.FrozenModel has been renamed tf.GraphModel.
  • When converting models with the tensorflowjs pip package, use --output_format strings tfjs_layers_model and tfjs_graph_model instead and tensorflowjs.
  • Tensor.get is deleted. Please use Tensor.array and native array indexing instead.
  • Tensor.buffer is now async (returns a Promise). If you need the sync version, please use Tensor.bufferSync.
  • tf.fromPixels is deleted. Please use tf.browser.fromPixels instead.
  • tf.toPixels is deleted. Please use tf.browser.toPixels instead.
  • tf.batchNormalization is deprecated. Please use tf.batchNorm. Note the positional change of the arguments.
  • Dataset.forEach is deleted. Please use DataSet.forEachAsync instead.
  • LayersModel.fitDataset now only accepts {xs, ys} as a dictionary mapping 'xs' and 'ys' to their respective Tensor values. The [xs, ys] tuple format is now removed.
  • tf.io.browserHTTPRequest now takes two arguments, a url and an options object. See the new API here.
  • tf.data.generator() now takes a generator function*, instead of an iterator. See API doc.

0.15.3

25 Feb 20:00
e6b0aa3
Compare
Choose a tag to compare

High-level additions

TensorFlow.js 1.0 will be released during the TensorFlow dev summit on March 6th, 2019. With this release, we introduce some minor breaking API changes. If you are curious about this release, you can use the pre-release, version 1.0.0@next.

0.15.3 has both the new API and the old APIs. If you update to this version, you will get warning messages for methods that are deprecated which will point you to the new methods. If you migrate and get rid of the warnings in your code, you will be 1.0 ready.

Deprecated methods that will be removed in 1.0

  • tf.loadModel is deprecated. Please use tf.loadLayersModel instead.
  • tf.loadFrozenModel is deprecated. Please use tf.loadGraphModel instead.
  • Tensor.get is deprecated. Please use Tensor.array and native array indexing instead.
  • Tensor.buffer is now async (returns a Promise). If you need the sync version, please use Tensor.bufferSync.
  • tf.fromPixels is deprecated. Please use tf.browser.fromPixels instead.
  • tf.toPixels is deprecated. Please use tf.browser.toPixels instead.
  • tf.batchNormalization is deprecated. Please use tf.batchNorm. Note the positional change of the arguments.
  • Dataset.forEach is deprecated. Please use DataSet.forEachAsync instead.

New API

  • Tensor.array() and Tensor.arraySync() are added which return a deeply nested array (rather than a flat array like Tensor.data()).

Core (0.14.5 ==> 0.15.4)

Features

  • Add new interface LoadOptions (#1564) (#1555).
  • Fuse matMul with activation and bias for performance. (#1475).
  • Make oneHot a chainable op (#1484). Thanks, @jgartman.
  • Add onProgress to browserHTTPRequest & getLoadHandlers (#1485). Thanks, @syt123450.

Breaking changes

  • Rename batchNormalization to batchNorm and reorder args (#1550).
  • Deprecate Tensor.get(). Make tensor.buffer() async. Add tensor.array() (#1570).
  • Make tf.browser.fromPixels / toPixels and route tf.fromPixels / tf.toPixels to it. (#1545).
  • Add tf.deprecationWarn() and tf.disableDeprecationWarnings() (#1542).

Bug fixes

  • Replace vectorized packed div with channel-wise implementation to fix layers tests. (#1513).
  • Support packed broadcasting. (#1509).
  • Wrap static methods in a function wrapper so the node io namespace routing works. (#1507).
  • Wrap cropAndResize with an op decorator (#1506).
  • Potential fix for tfjs issue 545 (#1503). Thanks, @ClementVidal.
  • Enable true squarification when logical dimensions exceed texture size limits. (#1489).
  • Cut off negative values for padAlongDim in computing convInfo.padInfo (#1582).
  • Fix shallow slice bugs: dtype and mem leak (#1578).
  • Always test for a fence with gl2.clientWaitSync(sync, 0, 0) (#1531) (#1529).

Performance

  • Support packed broadcasting. (#1509).
  • Add partial support for broadcasting of bias in fusedMatMul. (#1502).
  • Pack unary ops. (#1505).
  • Packed pad operation. (#1498). Thanks, @astojilj.
  • Enable packed depthwiseConv for arbitrary dilation / padding. (#1499).
  • Fuse matMul with activation and bias for performance. (#1475).

Development

  • Test tfjs-node against the 0.3.x release branch during integration tests of the release branch. (#1557).
  • Add deprecation warnings for Tensor.get, Tensor.buffer, tf.fromPixels, and tf.toPixels (#1547).
  • Disable the List models: 0 result test as it's failing at head. (#1536) (#1535).
  • Create packed testing environment. (#1469).

Documentation

Misc

  • remove content-type checks (#1541).
  • Checkout the release branches in the integration tests for core. (#1528).
  • Add test for batchnorm with broadcasted inputs. (#1511).
  • catch all unhandled promise rejection for http browser io handler (#1455)
  • Add util to get the non-flattened tensor data (#1483). Thanks, @Lewuathe.
  • Update benchmark to depend on latest tfjs-core (fixes travis test) (#1496).
  • Support high rank indices for gather op (#1438)
  • Revert: Run tests in Node 8 instead of Node 10. #1450 (#1494).
  • Ensure axis is validated against tensor shape length in unstack. (#1493).
  • Make Engine explicitly implement TensorTracker (#1488).

Data (0.1.7 ==> 0.2.3)

Features

  • Add size in dataset class (#126).
  • Support loading local file through tf.data.csv API (#125).

Breaking

  • Rename dataset.forEach to dataset.forEachAsync and Replace tensor.get() with tensor.dataSync() (#144).
  • tf.data.generator() now takes a generator function*, instead of an iterator. See API doc.

Development

Documentation

  • Reorder class methods in Dataset, add jsdoc tag for Dataset.prefetch() and CSVDataset.columnNames() (#123).

Layers (0.9.2 ==> 0.10.3)

Features

  • cherry-pick to 0.10.x: Add tf.loadLayersModel(); deprecating tf.loadModel() for now (#460).
  • Model.fitDataset(): Use size when available & there's no batchesPerEpochs (#439).
  • tf.Model.evaluateDataset(): Allow omitting config object (#427).
  • Provide types describing the Keras JSON format (9/n) [Collect valid values of classname into a type] (#424).
  • Add initializers: HeUniform and LeCunUniform (#421).
  • Provide types describing the Keras JSON format (7/n) [Enforce *Serialization is JSON-like. Add top level, training_config etc.] (#420).
  • Provide types describing the Keras JSON format (6/n) [Add all the rest of the layer serializations] (#419).
  • Provide types describing the Keras JSON format (4/n) [Provide core layer configs in src/keras_format (4/n)] (#417).
  • Provide types describing the Keras JSON format (3/n) [Move ActivationIdentifier into src/keras_format (3/n)] (#416).
  • Provide types describing the Keras JSON format (2/n) [Move Shape and DataType into src/keras_format (2/n)] (#415).
  • Provide types describing the Keras JSON format (1/n) [Factor apart *Args and *Serialization. 1/n: the trivial cases] (#405).

Bug fixes

  • Change spies to conform with window.fetch API. (#434).
  • fix: Dropout Memory Leak (#428). Thanks, @piercus.
  • Allow tf.layers.global(Max|Average)Pooling1d() to take no args (#422).
  • Fix an issue in loading ndarray-style scalar serialization (#436).

Performance

  • Small speedup in predict loop (#430).
  • Remove double yielding in fit()/fitData...
Read more

0.14.1

11 Dec 15:32
369a821
Compare
Choose a tag to compare

High-level additions

  • tfjs-data has launched with: tf.data.array, tf.data.csv, tf.data.zip and chainable transformation methods on a tf.data.Dataset.
  • New ops: tf.spectral.fft, tf.spectral.rfft, tf.spectral.irfft, tf.spectral.ifft, tf.conv3d, tf.math.confusionMatrix
  • New ops supported by the tfjs-converter: FloorMod, BatchMatMul, CropAndResize, SplitV, Atan2, LeakyRelu, LogSoftmax, SparseToDense, ListDiff, SparseToDense, Prod, FFT, IFFT, RFFT, IRFFT, ScatterND, GatherND
  • New layers in tfjs-layers: tf.layers.dot, tf.layers.relu
  • Added new method tf.Model.fitDataset which allows passing a tf.data.Dataset from tf.data to a fit call.

Breaking changes

  • Implementation of BatchNormalization training code in layers now aligns with tf.keras (#385).

Core (0.13.0 ==> 0.14.2)

Features

  • Add Conv3d (#1238). Thanks, @zboldyga.
  • Allow users to pass a list of TypedArray in tf.tensor() (#1424).
  • Add TensorLike to chaining API typings and add unit tests. (#1413).
  • Add string dtype to Tensors (#1408).
  • Support Rank > 1 Tensors for tf.spectral.fft and ifft (#1388). Thanks, @Lewuathe.
  • Add tf.spectral.rfft(). (#1351). Thanks, @Lewuathe.
  • Add tf.spectral.ifft(). (#1341). Thanks, @Lewuathe.
  • Add tf.spectral.irftt() ops. (#1395). Thanks, @Lewuathe.
  • Add tf.spectral.fft() ops. (#1191). Thanks, @Lewuathe.
  • Add subkernel timing information to the Profiler output (#1334).
  • Support uploading / downloading of n-D tensors from packed textures (#1327).
  • Support higher dimensional FFT on GPU. (#1335).
  • Add tf.math.confusionMatrix (#1332).
  • Add packed batchnormalization kernel behind an environment flag (#1330).
  • Add conv2dTranspose gradients (#1317).
  • Add complex64 support for tf.abs(). (#1331).
  • Add dilation to pooling operations (#1261). Thanks, @larrylindsey.
  • Make packed 2D logical coordinates independent of texture coordinates (#1302).
  • Add fft as tensor ops to the chaining API (#1294). Thanks, @Lewuathe.
  • Share tensors across backends (#1265).
  • Add paging environment flag (#1283).
  • support SetDiff1D op (#1307).
  • Support LogSoftmax op (#1342). Thanks, @yhwang.
  • added support prod reduce op (#1279).
  • Support SparseToDense op (#1303).
  • added support for GatherNd op (#1298).
  • Support ScatterNd op (#1296).

Bug fixes

  • Don't upload small tensors as uniforms to packed op programs (#1429). Thanks, @astojilj.
  • Remove the global outer scope, removing a memory leak in backend_cpu and in Node. (#1425).
  • Temporarily revert aggressive uploading of packed textures. (#1417).
  • Made tf.abs underflow-safe on CPU & GPU and added test for it. (#1391). Thanks, @DirkToewe.
  • ensure webgl backend read downloads converted typedarray (#1382). Thanks, @tafsiri.
  • , DEV [Update version to 0.13.10 and improve publish-npm script] (#1380).
  • Fix pow gradients for x ^ 2, x = 0. (#1376).
  • Fix pool() when dilation > 1 (#1367).
  • Convert ComplexAbs to a kernel. (#1353).
  • Move auto-incremented tensor and variable ids to Engine (#1349).
  • Bail out of polling for the query timer if the context has been disposed [Stop polling for the query timer extension when the GPGPU context is disposed] (#1352).
  • Replaces the isNaN check with val < 1.0 || 0.0 < val || val == 0.0 [Replace the isNaN check which fails for iOS 12.0.1] (#1346).
  • Unpack eagerly within packed ops that reshape their outputs (#1345).
  • Cache MAX_TEXTURE_SIZE (#1312).
  • Move FFT ops under the spectral namespace. (#1309).
  • PERF [Im2Col] (#1289).
  • PERF [Optimize the WebGL samplers] (#1227).
  • Fix ArgMinMaxProgram bestIndex initialization. Thanks, @pvaneck.
  • Allow different dtypes in binary math ops (#1432).

Performance

  • Implement packed clipping op. (#1412).
  • Implement packed depthwiseConv. (#1418).
  • Lazily upload tensors as packed if they're going into a packed op (#1375).
  • Enable lazy unpacking by rearranging data within webGL textures when necessary as part of reshaping (#1358).
  • Speedup matmul when the matrices are vectors (#1379).
  • Optimize pool CPU. (#1374). Thanks, @jgartman.
  • Lazily pack and unpack textures in WebGL kernels (#1329).
  • Optimize resizeNearestNeighborBackprop CPU (#1333). Thanks, @jgartman.
  • Optimize tf.resizeNearestNeighbor CPU. (#1316). Thanks, @jgartman.
  • Make packed 2D logical coordinates independent of texture coordinates (#1302).
  • Add a PROD environment flag (#1301).
  • Optimize resizeBilinearBackprop on CPU (#1299). Thanks, @jgartman.
  • Optimize resizeBilinear on CPU (#1291). Thanks, @jgartman.
  • Add 16bit support for packed matmul (#1308).

Development

  • Disable uniform uploads when testing on Travis (#1393).
  • Update typings to be TypeScript 3.0 compatible. (#1394).
  • Fix failing test in travis (#1381).
  • Remove node 8 from travis since 10 is LTS (#1377).
  • Add integration test with layers/node/converter when we modify version.ts (#1372).
  • Change KernelBackend from an interface to a class (#1355).
  • Update .travis.yml to send notifications on build failure. (#1360).
  • Speedup yarn publish-local by not producing browser bundles (#1354).
  • Centralize canvas and WebGL context creation to avoid 'WEBGL_CONTEXT_LOST' (#1350).
  • Modify MAX_TEXTURE_SIZE caching function to align with existing conventions (#1314).
  • Chores: Cleans up dead scripts; Standardizes test file names (#1290). Thanks, @manrajgrover.
  • Prevent TypeError of 'arraysEqual()' for null arguments. (#1281). Thanks, @cimfalab.
  • PERF [Add a standalone benchmark page for profiling models] (#1292).
  • reenable check for query extension (#1286).
  • Add linting to benchmarks and fix linter errors. (#1282). Thanks, @Lewuathe.
  • Fix obsolete command in benchmark tools. (#1280). Thanks, @Lewuathe.

Documentation

  • spaceToBatchND doc fixes (#1411)...
Read more

0.13.0

18 Sep 14:22
53d3ee9
Compare
Choose a tag to compare

High-level additions

  • MobileNet is sped up by 2x on most devices due to texture packing
  • complex64 dtype added
  • Added tf.profile() to profile memory characteristics of functions
  • Added BatchToSpaceND / SpaceToBatchND
  • Precision / recall metrics added to layers API

Core (0.12.0 ==> 0.13.0)

Features

  • Add gradients for tf.min and tf.max (#1272).
  • Add cropAndResize op (#1252). Thanks, @AviKndr.
  • Add a complex64 dtype. (#1213).
  • Add tf.depthToSpace. (#1220). Thanks, @jgartman.
  • Use a more robust algorithm for uniform random variates (#1240). Thanks, @kgryte.
  • Make zerosLike and onesLike chainable. (#1229). Thanks, @manrajgrover.
  • Make split chainable. (#1228). Thanks, @manrajgrover.
  • Make atan2 op chainable. (#1226). Thanks, @manrajgrover.
  • Add separableConv2d in the chaining API. (#1222). Thanks, @Lewuathe.
  • Add gradients to oneHot, argMax, argMin, greaterEqual (#1218). Thanks, @indutny.
  • Add support for multiple string URLs in IORouterRegistry (#1214).
  • Expose GPGPUProgram and MathBackendWebGL.compileAndRun. (#1202). Thanks, @aman-tiwari.
  • Support stridedSlice in Tensor (#1198). Thanks, @Lewuathe.
  • Gradients for spaceToBatchND and batchToSpaceND (#1178). Thanks, @jgartman.
  • Add support for tensors with 0 in shape (#1196).
  • Add Tensor.topk in the chain API. (#1192). Thanks, @Lewuathe.
  • Add tf.addN(), allow bool weights and improve tslint (#1190).
  • Add async versions of dynamic ops: nonMaxSuppressionAsync, whereAsync (#1179).
  • Add tf.spaceToBatchND (#1176). Thanks, @dikatok.
  • Add tf.topk (#1172).
  • Adds Softmax Cross Entropy Loss (#1133). Thanks, @manrajgrover.
  • Add Sigmoid Cross Entropy Loss (#1120). Thanks, @manrajgrover.
  • Add batchToSpaceND op (#1121). Thanks, @jgartman.
  • Gradient for LRN (#1149). Thanks, @jgartman.
  • Support 3D batch shape in eye ops. (#1137). Thanks, @Lewuathe.
  • Add tf.profile() to give performance characteristics of functions. (#1247).
  • Implement batch matmul. (#1259).
  • Add support for binary model loading through browser http handler (#1207). Thanks, @pyu10055.
  • Added support for shrink axis mask for StridedSlice op (#1201). Thanks, @pyu10055.

Bug fixes

  • Fix bug in gradient of concat when axis is -1 (#1267).
  • Fix batchToSpaceND assertion to include paddings. (#1243). Thanks, @dikatok.
  • Change epsilon for 32 bit float to 1e-7 and add couple more unit tests (#1244).
  • Fix ENV.get('EPSILON') and add a unit test (#1239).
  • Add EPSILON to the environment flag (#1223).
  • Fix argMax & argMin benchmarks (#1174).
  • Fix squeeze and concat when all tensors are 0 sized (#1199).
  • Fix instanceof check of tf.Tensor for null/undefined (#1186). Thanks, @justadudewhohacks.
  • Unbind the pixel pack buffer after copying the texture into the buffer. (#1188).
  • Allow tf.loadModel(url) in node.js if fetch exists (#1184). Thanks, @aman-tiwari.
  • Add support for fences in WebGL 2.0. Turn off query timers. (#1177).
  • Fix a bug in concatenateTypedArrays (#1181).
  • Remove 'this' from the static method SerializationMap.register (#1156).
  • Align expandDims with TF for negative axis (#1141). Thanks, @Lewuathe.
  • Fix unary benchmark error (#1153). Thanks, @Lewuathe.
  • use setImmediate instead of requestAnimationFrame on Node.js (#1145). Thanks, @ChALkeR.
  • Add Symbol.hasInstance so that instanceof Tensor succeeds across package boundaries. (#1146).
  • Make tf.pow consistently handle NaNs with CPU/GPU. (#1136). Thanks, @jgartman.
  • Add tf.nonMaxSuppression (#1060). Thanks, @justadudewhohacks.
  • Fixed decodeWeights bug and added quantization support (#1219). Thanks, @pyu10055.
  • io_utils: use Buffer methods instead of Blob/atob/btoa on Node.js (#1135). Thanks, @ChALkeR.

Performance

  • Make Backend.concat() take tensor[], instead of 2 tensors (#1260).
  • Small optimization for TensorBuffer constructor. (#1257). Thanks, @VariableVasasMT.
  • LRN and LRNGrad CPU backend optimization, 8x speedup. (#1235). Thanks, @jgartman.
  • Add block matmul (#1212). Thanks, @aman-tiwari.
  • Optimize mobilnet_v2 on CPU by 50-100x by optimizing MathBackendCPU (#1210).
  • use matmul in conv2d for pointwise conv (#1274).
  • Pack textures into 2x2 blocks and implement matmul packing. (#1249).

Development

  • Improve publish-npm script (#1268).
  • Force yarn versions >= 1.3.1. (#1245). Thanks, @happyhj.
  • Make tensor tests to set float32 dtype explicitly (#1254). Thanks, @happyhj.
  • serialization.SerializationMap.register -> serialization.registerClass (#1246).
  • Refactor tf.io.loadWeights() to use tf.io.decodeWeights() (#1236).
  • Fix firebase date logging. (#1211).
  • Allow multiple URL paths in tf.io.browserHTTPRequest (#1205).
  • Collect benchmarks from karma and send them to firebase. (#1197).
  • Use customGrad in exposed GPGPUProgram tests (#1204). Thanks, @aman-tiwari.
  • Fix benchmarks on browserstack (#1194).
  • Move webgl typings to dependencies instead of devDependencies. (#1185).
  • Throw an error if NaN is passed to tf.oneHot in debug mode. (#1180). Thanks, @zboldyga.
  • Remove karma in benchmarks karma_test.ts. (#1175).
  • Fix test-travis script. (#1173).
  • Add benchmarking experiment for browserstack, which runs nightly on a cron. (#1168).
  • Linear Algebra Tests: Add seed to randomNormal for consistency (#1167). Thanks, @manrajgrover.
  • Expose tf.ENV.backend (#1165).
  • Add CPU_FACTORY from jasmine_util so clients can setup node testing environments. (#1163).
  • Add declare to interfaces that describe JSON types (#1161).
  • test_node: throw on unhandled promise rejections (#1152). Thanks, @ChALkeR.
  • Name all scopes, even when no name is passed. (#1151). Thanks, @ChALkeR.
  • Remove @operation decorator (#1147).
  • Rearrange and revive benchmark tools in tfjs-core ([#1131](https://git...
Read more

0.12.0

04 Jul 00:55
b356665
Compare
Choose a tag to compare

High-level additions:

  • Operations now accept JavaScript arrays as well as tensors.
    • e.g. tf.square([1, 2, 3])
  • Major precision improvements for iOS and desktop Safari.
  • 5D and 6D tensor support added.
  • Add tf.Model.summary().
  • Support nested sequential models.
  • Add new layer: tf.layers.upSampling2d.
  • Support loading with HTTP request options (e.g., credentials).

Core (0.11.1 ==> 0.12.0)

Features

  • Allow ops to take primitive arrays, not just Tensors (#1119).
  • Add gradient for ResizeNearestNeigbor. (#1118).
  • Add tf.any. (#1114). Thanks, @manrajgrover.
  • Add tf.all. (#1104). Thanks, @manrajgrover.
  • Add 6D tensors. (#1084). Thanks, @jgartman.
  • Add Sigmoid Cross Entropy With Logits. (#1091). Thanks, @manrajgrover.
  • Added tf.where gradient function and associated tests (#1059). Thanks, @julianoks.
  • WebGL kernel and gradient for unsortedSegmentSum (#1051). Thanks, @jgartman.
  • Add backend.floorDiv [Add backend.floorDiv to align tf.div op] (#1061). Thanks, @Lewuathe.
  • Add tensor5d() and support for 5D tensor in WebGL backend (#1022). Thanks, @zaidalyafeai.
  • Add gradients for depthwise 2d convolutions (#1069). Thanks, @asross.
  • Add load() to BrowserHTTPRequest [Add BrowserHTTPRequest.load()] (#1067).
  • BrowserHTTPRequest.load() supports requestInit (HTTP request options). [Add BrowserHTTPRequest.load()] (#1067).
  • Add tf.dot (#1066). Thanks, @asross.
  • Add huber loss (#1048). Thanks, @manrajgrover.
  • Add tf.linalg.qr() (#1128).

Bug fixes

  • When backend is already registered, reuse existing backend (#1130).
  • Fix tf.fromPixels when using tfjs-core from node (cpu backend) (#1127).
  • Loss Ops: Broadcast weights before SUM_BY_NONZERO_WEIGHTS reduction (#1125). Thanks, @manrajgrover.
  • Fixing various nan related issues impacted by floating point precision and NaN (#1116). Thanks, @reighlan.
  • When disposing a kept tensor, remove it from the keep tensors array. (#1113).
  • : oneHot overflow for CPU version kernel. [Fix for oneHot overflow issue] (#1112).
  • Fix index for tf.min on backend CPU. (#1105). Thanks, @jbencook.
  • Optimizers: Change epsilon value as per environment to 1e-4 for iOS. (#1106). Thanks, @manrajgrover.
  • : #435 [One Hot: Fixes CPU result dtype] (#1110). Thanks, @manrajgrover.
  • Fix unsortedSegmentSum so it can call the Tensorflow backend (#1103). Thanks, @jgartman.
  • Improve precision for Safari by using float16 on iOS and encoding floats as bytes before downloading. (#978).
  • Check whether uniform locations are null before trying to upload them. (#1100).
  • Don’t require("crypto") in browsers. (#1092). Thanks, @mbostock.
  • WebGL Backend: Centralize async reading of data, postpone disposal if a pending read (#859).
  • Fix memory management bugs with tidy(). (#1080).
  • Fix clipByValue gradient for values less than min or greater than max (#1076). Thanks, @Lewuathe.
  • Check condition type strictly in tf.where. (#1062). Thanks, @Lewuathe.
  • Make sure tf.fromPixels() gets called after the DOM is ready (#1064).

Performance

  • When disposing a kept tensor, remove it from the keep tensors array. (#1113).
  • Upload small tensors that live on CPU as uniforms (#1087).
  • WebGL kernel and gradient for unsortedSegmentSum (#1051). Thanks, @jgartman.
  • WebGL Backend: Centralize async reading of data, postpone disposal if a pending read (#859).

Development

  • Upgrade to typescript 2.9.2 and fix problems to make it compile inside Google (#1134).
  • Add a npm run coverage script, which produces coverage [Initial test coverage generation support] (#1132). Thanks, @ChALkeR.
  • Remove circular deps (#1117).
  • Only run karma tests on node v10. (#1101).
  • Migrate environment feature testing to test-if-capable instead of filtering. (#1090).
  • Make es bundle and remove dist-es6/ (#1095).
  • This PR adds redundant files to .npmignore. Also, adds package to .gitignore. Finally removes few entries in .npmignore which are no longer part of source. [Dev: Ignore redundant files to propagate to npm] (#1077). Thanks, @manrajgrover.
  • Using dots reporter in Travis cleans up the log (see this PR's log) and makes it easier to see the failed tests. Also switch BrowserStack tests to High Sierra (10.3.x) [Use karma's dots reporter instead of progress for travis log] (#1075).
  • Update the test runner config to support async/await in tests. (#1068).

Documentation

  • Add tf.multinomial to docs. (#1126).
  • Fix nodejs cpu message - missing '@' on require. (#1123). Thanks, @tomasgvivo.
  • Fix docs for unsortedSegmentSum. (#1122). Thanks, @jgartman.
  • Documentation: Elaborate on strict versions of concat, reverse, batchNormalization and pad ops (#1096). Thanks, @manrajgrover.
  • Update second tensor5d example to be valid (#1098). Thanks, @nbardy.
  • Array Ops: Fixes Unstack ops documentation example (#1094). Thanks, @manrajgrover.
  • Fix documentation for atan2 (#1093). Thanks, @jgartman.
  • Improve the print-outs in code snippets for model management methods (#1086).
  • Add a message for users running tf.js in node without the node backend (#1085).
  • Add model management functions to io namespace in generated docs (#1082).
  • Update LRN docs to reflect removal of 'normRegion' argument (#1073). Thanks, @jgartman.
  • Fix documentation issues.
  • Mention node bindings in setBackend docstring. (#1065). Thanks, @davidsoergel.

Misc

  • Improve error messages in tensor constructors to throw if passed null values. (#1111). Thanks, @Lewuathe.
  • update raw byte calculation to use byteLength (#1108). Thanks, @kumarde.
  • Add tsconfig.json to .npmignore. (#1102). Thanks, @HRK44.
  • Add concatenateArrayBuffers to tf.io export for Node.js HTTP (#1099).
  • Register BrowserHTTPRequest as a load handler (#1074).
  • Add execute method for inference model to allow retrieve activation for any internal nodes (#1070).
  • Update pull request template (#1050). Thanks, @manrajgrover.
  • Change the regex check for git origin (#1058).
  • Make sure tf-core.(min).js bundle has the @license header (#1063).
  • added inference model interface for sharing between layer model and frozen model (#1053).

Layers (0.6.2 ==> 0.7.0)

Features

  • Add tf.Model.summary() ([#238](https:...
Read more

0.11.2

25 May 03:41
6f7486b
Compare
Choose a tag to compare

Core (0.11.0 ==> 0.11.1)

Bug fixes

  • Previously cumsum would pass the original axis to the backend, even if the input was permuted. No tests were failing in core since webgl backend ignores the axis param anyway, but other backends (e.g. node) don't. This fix makes cumsum tests pass in tfjs-node. [tf.cumsum should pass the correct axis to backend.cumsum] (#1054).

Documentation

  • Added model management methods under tf.io.* to website. [Add @doc annotations to model management methods] (#1055).

Misc

Layers (0.6.1 ==> 0.6.2)

Bug fixes

  • Fixed the loading of Pooling1D layers such as MaxPooling1D. [Fix issue re Pooling1D layer deserialization] (#208).
  • Fixed the saving and loading of Concatenate layers (tf.layers.concatenate). [Add getConfig() to layers Concatenate and Bidirectoinal] (#206).

Misc

  • Fixed typo in Orthogonal Initializer warning message. (#201). Thanks, @timotheebernard.

0.11.1

18 May 19:16
d39f6b6
Compare
Choose a tag to compare
  • Add capability to save and load tf.Models using the following mediums:
    • browser Local Storage
    • browser IndexedDB
    • browser file downloads and uploads
    • HTTP requests
      See Tutorial Page for more details. (#181).

Core (0.8.3 ==> 0.11.0)

Features

  • Add tf.unstack (#1018). Thanks, @Lewuathe.
  • Add tf.losses.logLoss (#1021). Thanks, @manrajgrover.
  • Add tf.losses.hingeLoss (#1008). Thanks, @manrajgrover.
  • Gradient for tf.gather (#981). Thanks, @jgartman.
  • Add resizeBilinear gradient implementation. (#996).
  • Add tf.losses.cosineDistance (#1005). Thanks, @manrajgrover.
  • Add tf.losses.meanSquaredError (#991). Thanks, @manrajgrover.
  • Add tf.disposeVariables which disposes all registered variables. (#988). Thanks, @Lewuathe.
  • Add tensor.round() (chaining was missing for round) (#994). Thanks, @manrajgrover.
  • Add support for loading quantized weights (#965).
  • Add tf.linalg.gramSchmidt and tf.eye (#1024).
  • Add tf.io.browserHTTPRequest (#1030).
  • Add tf.io.browserDownloads() and tf.io.browserFiles() (#1012).
  • Add IOHandler subtype BrowserLocalStorage. (#1003).
  • Add tf.cumsum (#1032).
  • Add tf.io.browserIndexedDB (#1017).
  • Add support for StridedSlice (#1026).
  • Add model store managers (#1038).

Breaking changes

  • The symbol "tfc" becomes "tf" for ES5 tf-core.js bundle users. [Convert core to use rollup for bundling.] (#1037).
  • Export GPGPUContext and add getCanvas() to the WebGLBackend. (#982).

Bug fixes

  • Fix bug: transpose(scalar|1d) should return a clone. (#1033).
  • Remove explicit dispose in tf.grad to fix second-order gradient (#1013). Thanks, @Lewuathe.
  • Clean up tensor leak in tf.toPixels() (#1031).
  • Fix the import/export of gpgpu_util. (#1009). Thanks, @Nicola17.
  • Fix a bug with backendCPU.conv2dDerInput (#1014).
  • Fix tensor2d/3d/4d to require shape to have the correct length (#1004).
  • Checks if window location is not undefined (#1002). Thanks, @manrajgrover.
  • Default behavior changed with newest NVidia Drivers in Mac OS >=10.13.4 so we have to check for NaN explicitly. [Fix nan propagation in tf.relu] ([#1001]
  • Improve the WebGL random number generator (#993). Thanks, @Nicola17.
  • Fix build issue where module-import code gets dropped from the bundle (#987).
    (tensorflow/tfjs-core#1001)).
  • Align tf.resizeNearestNeighbor with TF. (#1000). Thanks, @Lewuathe.
  • Return 0 for tf.sign(NaN) to align with TF (#998).

Performance

  • Optimize CPU conv2dDerInput on CPU to be 100x faster (#995). Thanks, @piscisaureus.
  • Quantizing weights reduces model size and improves model download time [Add support for loading quantized weights] (#965).

Development

  • adds template to pull request message [adds pull request template] (#1036).
  • Travis: run tests on Node.js 10 as well (#1039). Thanks, @DanielRuf.
  • Travis: use yarn cache (#1040). Thanks, @DanielRuf.
  • Travis: clone only last 5 commits (#1041). Thanks, @DanielRuf.

Documentation

  • Fix typo in tf.tile documentation. (#1043). Thanks, @sorig.
  • Remove erroneous endpoint parameter from linspace JSDoc (#1020). Thanks, @Lewuathe.
  • Removed duplicate typo in tf.buffer docs (#1023). Thanks, @HarshaLaxman.
  • Fixe bug in oneHot doc example (#1015). Thanks, @manrajgrover.
  • Fix code snippet in docs where indices should be int32 (#989). Thanks, @nbardy.
  • Fix typo in comments of io module. (#1006). Thanks, @Lewuathe.
  • Update a comment in environment.ts reference deeplearn.js. (#1007). Thanks, @jgartman.
  • Add logic operation code snippets in jsdocs (#900). Thanks, @nbardy.
  • Update docstring for tf.setBackend() re disposing the old backend. (#1029).

Misc

  • Export GPGPUContext and add getCanvas() to the WebGLBackend. (#982).
  • Add IS_BROWSER to ENV; add scheme-based URL router to tf.io.* modules (#1034).
  • Add tf.pad test for 4d tensor and test memory (#1025).
  • Exports operation decorator for use in tfjs-layers (#1027).
  • Add serialization infrastructure to core (#997).
  • Add tests for tf.conv1d gradients (#992). Thanks, @easadler.
  • Add basic types and helper methods for model exporting (#990).

Layers (0.5.2 ==> 0.6.1)

Features

  • Add version string (e.g., 'tfjs-layers 0.10.3') to the keras_version field of JSONs from model serialization.(#157).
  • added tf.layers.cropping2D (#155). Thanks, @zaidalyafeai.

Breaking changes

  • "tfl" => "tf" for es5 bundle users. (#191).
  • Remove the exporting of the backend symbols (#193).
  • Model.fit(): Change default epochs to 1 (#156).

Bug fixes

  • Fix axis in Softmax activation layer (#177). Thanks, @janhuenermann.
  • Fix slowness in Orthgonal initializer for some RNN layers. (#172).
  • The padding mode is called 'causal' not 'casual' (#152). Thanks, @piscisaureus.

Development

  • chore: use yarn cache (#187). Thanks, @DanielRuf.
  • chore: add Node.js 10 (#189). Thanks, @DanielRuf.
  • adds default pull request template to help remind contributors to use PR commit message tags. (#180).
  • Add integration_test/tfjs2keras. (#173).

Documentation

  • Add code snippet for tf.layers.reshape. (#198).
  • Clarify that the default value of useBias is true for (#162).
  • Clarify that filters is a required field for non-depthwise (#162).
  • Fixes #165: Document model.fit callbacks (#149). Thanks, @manrajgrover.

Misc