github tensorflow/tfjs v0.13.0
0.13.0

latest releases: tfjs-v4.19.0, tfjs-v4.19.0-rc.0, tfjs-v4.18.0...
5 years ago

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). Thanks, @Lewuathe.
  • Run tests in node. Also reorganize the testing infra (#1139).
  • build sourcemaps for esm bundle (#1160). Thanks, @tafsiri.

Documentation

  • Moves qr and gramSchmidt to under linalg namespace in the documentation (logically there already) [Linalg qr] (#1255).
  • Adds code snips to both. [Linalg qr] (#1255).
  • linalg namespace update. [Linalg qr] (#1255).
  • Fix various typos (#1242). Thanks, @kgryte.
  • Fix minor typos in docs. (#1234). Thanks, @Lewuathe.
  • Fix typo suport -> support in unit tests. (#1231). Thanks, @Lewuathe.
  • Add missing tf. in topk example. (#1232). Thanks, @moghammed.
  • Fix batchtospace doc string to remove parenthesis. (#1171).
  • Remove the doc decorator in favor of a jsdoc annotation. (#1158).
  • Fix error message for invalid dtypes by adding a space. (#1144). Thanks, @Lewuathe.
  • Fix jsdoc for atan2.
  • Remove deeplearnjs paragraph from README.md (#1157).
  • Fix docs to not mention tf.io.browserDownloads(), since it's not exported. (#1169).

Misc

  • Ensure browser-specific tests are specified. (#1270). Thanks, @nkreeger.
  • Add return type to cropandresize (#1263).
  • Tiny fix for internal build (#1264).
  • Add a test to ensure that argmin/argmax work with bool tensors. (#1258). Thanks, @nkreeger.
  • Cache engine by backend name (#1233). Thanks, @pyu10055.
  • Remove gramSchmidt matmul unit test because of timeout.
  • Remove the models directory. (#1217).
  • Allow passthrough save handler to be async. (#1200).
  • Fix custom webgl program unit test (#1203). Thanks, @aman-tiwari.
  • Add unary ops in benchmark tools (#1170). Thanks, @Lewuathe.
  • Ignore bundle.js in benchmark tools (#1162). Thanks, @Lewuathe.
  • improve .npmignore.
  • Ensure that all scopes are named (#1154). Thanks, @ChALkeR.
  • Add passthrough IOHandlers to save and load models to and from memory (#1148).

Layers (0.7.0 ==> 0.8.0)

Features

  • This PR adds recall to the metrics api [Metrics: Adds recall to the api] (#323). Thanks, @manrajgrover.
  • Metrics: Adds precision to the api (#320). Thanks, @manrajgrover.
  • Adds error checking when adding layers to a sequential model which would result in outputs of negative size (matching behavior in py keras. [Adds error for building models with negative shapes] (#311).
  • Minor error message improvement for a confusing tf.losses case. softmaxCrossEntropy is known as "categoricalCrossentropy" [Clarifies error message for tf.losses.softmaxCrossEntropy as string] (#307).
  • Adds support for tensor.dot() for full set of compatible shape (rank4.dot(rank5) .. etc). [Adds support for tensor.dot() for full set of compatible shapes] (#305).
  • Add support for stateful RNN (#292).
  • Add tf.layers.reLU (#290).
  • Two improvements to Model.fit() (#288).
  • Add new method dispose() to tf.layers.Layer and tf.Model (#282).
  • Add Layer: Permute (#281).
  • Add option yieldEvery to ModelFitConfig; add heuristics for auto yielding (#274).
  • Implement initialState support in Bidirectional (#269).
  • Improves type checking for an easy mistake. Constant initializer takes a config object, not the value directly [Constant init] (#260).
  • Print to console.warn on incompatible input shapes (#265).
  • Activate initialEpoch for model.fit (#261). Thanks, @hpssjellis.
  • Adding dropout implementation to RNNs (#203). Thanks, @ericdnielsen.
  • Let UpSampling2D Layer accept undetermined image sizes (#262).
  • Allow loading weights partially. (#278).

Bug fixes

  • Fix a bug in the handling of array of step outputs by TimeDistributed layer (#315).
  • Allow tf.layers.batchNormalization() to take no arg [Allow tf.layers.batchNormalization() to take no arg] (#308).
  • Fixes issue wherein a model with just an embedding layer could not accept int32 type input. [Fix for overly-agressive dtype checking for symbolic tensors. Rely instead on casting.] (#256).
  • Add getConfig() to DepthwiseConv2D layer (#266).
  • Use backward layer for computing yRev even when an initial state is given. (#318).
  • fix: Cropping2D gives wrong output shape with non-square tensor (#314). Thanks, @tehsenaus.
  • Switch hardcoded epsilon in tfjs-layers to tf.ENV.get('EPSILON') (#298).

Performance

  • Some performance optimization for RNNs (#321).
  • Dispose intermediate RNN outputs to avoid running out of memory. (#316).
  • Optimize Add, Multiply and Average layers (#293).

Development

  • Add stubs and fakes for Dataset (#317).
  • Improve publish-npm script (#313).
  • Enhance tfjs2keras integration test (#277).
  • Remove tslint:disable:max-line-length for imports. (#276). Thanks, @HiyashiChuka.
  • Some fixes and improvements to integration_tests/benchmarks (#275).
  • Refactor topology.ts into smaller source files (#263).
  • Ship sourcemaps in npm bundle (#264). Thanks, @tafsiri.

Documentation

  • Fix a typo in JSDoc [Fix a typo] (#309). Thanks, @vmarkovtsev.
  • reset_states() -> resetStates() in inline documentation. (#306). Thanks, @brannondorsey.
  • Add printout to the code snippet for tf.loadModel (#301).
  • Remove the doc decorator. Split exports into multiple files. (#267).
  • Add missing params to Callbacks: samples and batchSize (#299).

Misc

  • Add CallbackConstructorRegistry and semantics of ModelConfigFig.verbose (#322).
  • Re-enable tfjs2keras integ test by upgrading tfjs-node (#319).
  • Add sanity check on batchSize in Model evaluate, fit & predict (#302).
  • Remove cruft from training_test.ts (#303).
  • Improve error message thrown when serializable object is not found (#300).
  • Correct typo (#295).
  • Typo fix (#286).
  • Add test and guard for circular model weight assignment. (#285).
  • Remove import from dist-internal modules (#283).
  • Update tslint dependency and allow for long lines with URLs. (#280).
  • Factor out countTrainableParams() (#279).
  • Expose tf.History, tf.layers.RNN and tf.layers.RNNCell (#273).
  • Add unit test for backwards Bidirectional LSTM (#268).
  • improve .npmignore.

Converter (0.5.0 ==> 0.6.0)

Features

  • Add support for NonMaxSuppressionV2 and NonMaxSuppressionV3 (#183).
  • Add support for TopK op (#182).
  • Add spport for batchToSpaceND and spaceToBatchND (#181).
  • Expose weights of a model (#171). Thanks, @aman-tiwari.
  • Support writing weights of type bool (#186).
  • Map Where Class to tfc.where (#174). Thanks, @manrajgrover.
  • Adds all and any support to converter (#161). Thanks, @manrajgrover.
  • Implemented tensor array ops and hooked up with the executor (#170).
  • Allow execute and executeAsync to feed the model with intermediate node (#204).
  • Add support for shapeN operation (#210). Thanks, @yhwang.

Bug fixes

  • Fix wrong assumption about the order of weights in a keras Model (#178).
  • fix issue getting number value for oneof field (#190).
  • Fix npm bundling (#192).
  • Added validation after grappler optimization (#187).
  • Fix the logic error if either control flow or dynamic shape flag is set (#195).
  • Fix the shape check on tensorarray scatter and split op (#201)..

Development

  • Publish source maps to npm (#191).
  • Make change to allow internal sync of source code (#189).
  • Move frozen model loading to use io handler (#196).
  • Add es module bundle (.esm.js) for converter and remove dist-es6 (#168).

Documentation

  • Fix the loadFrozenModel doc demo code (#198).
  • Add @doc to the public class and api (#176).
  • Rename model names in README to tensorflowjs_model.pb (#206). Thanks, @tushuhei.

Misc

  • Fix publish-npm script (#208). Thanks, @tafsiri.
  • Update dependency versions of tensorflowjs_converter (#205).
  • Coco ssd demo (#200)..
  • Add coco ssd demo (#199)..
  • Converter changes for fixing op issues related to SSD model (#194)..
  • Let keras-to-tfjs conversion put all weights in a single weight group by default (#193).
  • Allow shape in Long format converted to number array, also added test for shape check for dynamic tensors (#179)..
  • Uncomment test failing before but passing now (#177).
  • Add --strip_debug_ops flag to remove prints, asserts, etc. (#175). Thanks, @chrisdonahue.
  • Added no_op_check flag to allow skipping op validation (#160)..
  • Compile data/es6/compiled_api.js to es5 syntax while using es6 modules (#167).

Don't miss a new tfjs release

NewReleases is sending notifications on new releases.