question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tensorflow Hub module (example) for converter not working

See original GitHub issue

Using the latest TensorFlow.js version


Using the example for the Tensorflow Hub module example from the converter does not work.

Code for bash, according to example is:

$ tensorflowjs_converter \
    --input_format=tf_hub \
    'https://tfhub.dev/google/imagenet/mobilenet_v1_100_224/classification/1' \
    /mobilenet/web_model

But I get the error:

AttributeError: 'Namespace' object has no attribute 'output_dir'

Using help of the converter, it requires a structure like:

TensorFlow.js model converters. [-h] --input_format
                                       {tf_frozen_model,tensorflowjs,keras,tf_hub,tf_saved_model,tf_session_bundle}
                                       [--output_format {tensorflowjs,keras}]
                                       [--output_node_names OUTPUT_NODE_NAMES]
                                       [--saved_model_tags SAVED_MODEL_TAGS]
                                       [--quantization_bytes {1,2}]
                                       input_path output_path

I tried to put the output_path like instructed by the structure above, but the I get:

error: unrecognized arguments: /Users/..

Has anybody else encountered this? Do you know a solution? I would like to fix it, if somebody could tell me what the problem is.

Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
seranuscommented, May 7, 2018

You’ll have to wait for the implementations

1reaction
seranuscommented, May 6, 2018

There’s a typo, rename output_dir to output_path inside converter.py. After that I get an error if i set the output folder but it works

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common issues | TensorFlow Hub
Here is a quick example: # Create a folder for the TF hub module. $ mkdir ...
Read more >
Convert tensorflow-hub model to tensorflow lite(tflite)
Converting successed, use tensorflow 1.15 and python 1.6, tensorflow 1.5 was not support tensorflow-hub. – heiheihei. Jan 28 at 10:36. Add a ...
Read more >
@tensorflow/tfjs-converter - npm
Step 1: Converting a TensorFlow SavedModel, TensorFlow Hub module, Keras HDF5 or ... Not all pairs of input-output formats are supported.
Read more >
| notebook.community
Semantic Search with Approximate Nearest Neighbors and Text Embeddings · Download sample data. · Generate embeddings for the data using a TF-Hub module...
Read more >
Accelerating Inference in TensorFlow with TensorRT User Guide
Convert trained SavedModel using the TF-TRT converter. Build the TRT engines (optional, running the model will automatically build it). Save the converted model ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found