converting a Tensorflow model for Tensorflow.js
You can build from source and use the summarize_graph tool which is distributed as a part of Tensorflow graph_transforms tools. Detailed docs are available here. Quick install:

First, make sure you have bazel build system installed (for MacOS):

brew install bazel


Next get Tensorflow sources, build and run summarize_graph:

git clone git@github.com:tensorflow/tensorflow.git
cd tensorflow
bazel build tensorflow/tools/graph_transforms:summarize_graph
bazel-bin/tensorflow/tools/graph_transforms/summarize_graph --in_graph=path/to/model_graphdef.pb


Note that summarize_graph requires GraphDef format as input.

If during the build attempt bazel can't find Xcode, configure it:

bazel clean --expunge 
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license
bazel clean --expunge