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

TFLite export - Input and output nodes #142

Open
houtzager opened this issue Apr 9, 2019 · 3 comments
Open

TFLite export - Input and output nodes #142

houtzager opened this issue Apr 9, 2019 · 3 comments
Assignees
Labels

Comments

@houtzager
Copy link

Hi there,

I am trying to export a model to a TensorFlow Lite or preferably CoreML. For both, it is required to first convert the model to a frozen_model (.pb format). To do this I have already managed to extract a .pbtxt file from the session graph, which is required for the tensorflow.python.tools.freeze_graph function. The issue I am currently facing is that I need to specify the output_node_names variable which I do not know. And after this step, I would also need to figure out the input node name and shape for the conversion to CoreML.

Could anyone perhaps tell me which nodes are the input and output nodes and what their shapes are, or how I could find these?

Thanks in advance!

TFLite conversion documentation: https://www.tensorflow.org/lite/convert/
tf-coreml documentation: https://github.com/tf-coreml/tf-coreml

@jfkirk jfkirk self-assigned this Apr 16, 2019
@jfkirk
Copy link
Owner

jfkirk commented Apr 16, 2019

Hey @houtzager :

The inputs are these four placeholders and the three iterators below:
https://github.com/jfkirk/tensorrec/blob/master/tensorrec/tensorrec.py#L273

There are many different output nodes for different purposes. The most straightforward of the outputs is here:
https://github.com/jfkirk/tensorrec/blob/master/tensorrec/tensorrec.py#L662

If you go through the other predict* API methods, you'll find the other output nodes.

Hope this helps!

@houtzager
Copy link
Author

Hi @jfkirk ,

First of, thanks for your response.

Assuming you only need to specify a list of user and item features I find it a bit strange that for example properties like alpha and an interaction iterator are input nodes. Aren’t these variables meant for training the model instead of making the predictions?

After trying to get this export to work for quite some time I’ve decided to move on to another solution, so this issue may be closed.

@arturo-ojeda
Copy link

Hi @houtzager

Interested in this topic. Did you find a different solution to export to TF Lite or a whole different framework to achieve the same result?

Thanks.

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

No branches or pull requests

3 participants