Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Using hub.Module with TensorRT #108

Open
dchichkov opened this issue Jul 20, 2018 · 2 comments
Open

Feature request: Using hub.Module with TensorRT #108

dchichkov opened this issue Jul 20, 2018 · 2 comments
Assignees

Comments

@dchichkov
Copy link

@dchichkov dchichkov commented Jul 20, 2018

I'm trying it with TensorRT and hitting an issue: 'Graph' object has no attribute 'SerializeToString'. Is this expected? By the way, does it make sense to try to quantize/prune your MobilNet model with TensorRT?

graph = tf.Graph()
with graph.as_default():  
      mobilnet_op = hub.Module("https://tfhub.dev/google/imagenet/mobilenet_v2_100_128/feature_vector/2", trainable=True)
...
trt.create_inference_graph(input_graph_def = graph, outputs = "image_feature_vector",
    max_batch_size=1, max_workspace_size_bytes=50000000, precision_mode="FP16", minimum_segment_size=3)
@vbardiovskyg
Copy link
Member

@vbardiovskyg vbardiovskyg commented Jul 25, 2018

Hi, the graph object here is not a GraphDef. You can get it by calling graph.as_graph_def().

As for the second question, we haven't yet looked into using TensorFlow Hub graph defs with TensorRT, so we don't fully understand all the implications at this moment. We can keep this issue open to track any progress.

@andresusanopinto andresusanopinto changed the title 'Graph' object has no attribute 'SerializeToString'. Is this expected? Feature request: Using hub.Module with TensorRT Aug 30, 2018
@Harshini-Gadige Harshini-Gadige added the hub label Mar 14, 2019
@captain-pool
Copy link
Contributor

@captain-pool captain-pool commented Jul 9, 2019

@vbardiovskyg, as discussed earlier, I'ld like to work on this as a part of GSoC (most probably this month or in the coming month). can you assign this to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.