Skip to content

Releases: patlevin/tfjs-to-tf

TFJS Graph Converter v1.2

04 Aug 18:55
Compare
Choose a tag to compare

Changes

Features

  • Graph input and output nodes can now be renamed (using the util module)
  • Signature outputs can now be manually selected when saving as tf_saved_model.
  • Signature inputs and -outputs can now be renamed when saving as tf_saved_model.
  • Tags passed to API functions for SavedModel export are now optional and don't have have to be lists of strings anymore

CLI

  • NEW --outputs option to select exported outputs for tf_saved_model signatures.
  • NEW --rename option to rename exported inputs and outputs for tf_saved_model signatures.
  • NEW --method_name option to manually override the method name for tf_saved_model signatures.

API

Bug Fixes

Installation/Upgrade

Using pip:

pip install -U tfjs_graph_converter

Bugfix/Improvement

30 Jul 16:28
Compare
Choose a tag to compare

Bug Fixes

This release fixes an issue (#15) with signature generation if the model doesn't contain signature meta data and uses dynamic tensor dimensions.

Details

Some models (e.g. posenet/resnet50) don't contain signature meta data. In this case, the converter tries to "guess" the correct model signature.

This works by identifying inputs and outputs and selecting the tensor dimensions accordingly. Unfortunately, due to a coding error, unspecified (i.e. dynamic) dimensions where ignored instead of written as "-1" as per TF conventions. This lead to a mismatch in (output-) tensor dimensions.

Another minor issue arose from naming. While models with proper signature meta data used the tensor name (e.g. including channel id) as key, SavedModel signatures usually don't include the channel id. This has been fixed as well, so even if the signature is taken directly from the model itself, any channel ids will be removed.

Compatibility Fix

29 Jul 11:59
Compare
Choose a tag to compare

This release fixes a compatibility issue with the latest versions (v2.2 and v2.3) of tensorflow (see #14).

Bugfix Release

27 Jul 22:47
Compare
Choose a tag to compare

Bugfixes

  • Fixed issue #12 - Modules weren't imported by the main package, which led to confusion when importing the package
  • Fixed issue #13 - Signatures were missing from models when converting to the SavedModel-format

The following will now work as expected:

import tfjs_graph_importer as tf_conv

model = tf_conv.api.load_graph_model('~/my-models/tfjs/resnet50')

New Functions

Installation

The update is available on PyPi, so pip --upgrade tfjs_graph_converter should now install the latest version.
Installation from source works as well by downloading and unpacking the source code and running pip install . from the source folder.

Bugfix Release

28 Apr 22:53
Compare
Choose a tag to compare

Bug Fixes

  • Specifying SavedModel-tags on the command line resulted in tags being broken into individual letters

Big thanks to PapaEcureuil for finding the bug and submitting the fix!

TFJS Graph Converter v1.0

27 Apr 02:53
Compare
Choose a tag to compare

Version 1.0 Release 🎉

This is a big one. First of all, thanks to the feedback I received, this package can now be found on PyPi.
Installing via pip install tfjs-graph-converter is now possible 👍

Breaking Changes

  • package name changed from tfjs_graph_converter to tfjs-graph-converter; make sure to use pip uninstall tfjs_graph_converter before upgrading to this release

Features

  • Added support for models that use PReLU activation
  • Added additional graph optimisation (since models may now be rewritten)
  • Added complete suite of unit tests covering all public functions
  • Updated the documentation to include most modules
  • Package now available on PyPi
  • Extended API to include functions for wrapping loaded models in TF2 functions

Bug fixes

  • Reverted a change that altered the return value of load_graph_model() from tf.Graph to GraphDef protocol message, which caused problems for some users
  • Fixed a bug in node naming that could have lead to failed conversions

TensorflowJS to Tensorflow Converter [Preview]

26 Mar 18:11
Compare
Choose a tag to compare

This release fixes an error with unsupported layers.

Models containing Keras-layers (such as tf.keras.layers.PReLU), which are not supported by the GraphDef version will now show a proper error message that includes the operation name instead of an exception stack trace.

Converting these layers is currently not possible, though.

TensorflowJS to Tensorflow Converter

10 Feb 17:03
Compare
Choose a tag to compare

Feature Release

Added Features

  • Model description files (model.json) can now be specified directly with the input path

Models aren't always using the name model.json for their model description files. Up until now, users had to manually rename the model description files to the expected file name.
Starting with this release, you can now specify differing file names for model descriptions directly in the input path:

tfjs_graph_converter /path/to/download/folder/model-stride16.json /path/to/output/tf_model.pb

Models that use the default name model.json can still be converted by just specifying the folder name:

tfjs_graph_converter /path/to/tfjs/model/ /path/to/output/tf_model.pb

TensorflowJS to Tensorflow Converter

23 Jan 13:10
Compare
Choose a tag to compare

Fixes

  • fix Issue #3 : TypeError when converting model

TensorflowJS to Tensorflow Converter

11 Jan 20:20
Compare
Choose a tag to compare

TensorflowJS to Tensorflow Converter

A small Python 3 module for converting TFJS models to TensforFlow frozen graphs and SavedModels.
This is the first update since the initial release and fixes a problem with certain imported models.

Fixes

  • fixes #1 unable to load bodypix resnet50 model
  • mismatching license text in some source files