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

is the following operation possible #45

Open
marsupialtail opened this issue Aug 28, 2021 · 1 comment
Open

is the following operation possible #45

marsupialtail opened this issue Aug 28, 2021 · 1 comment

Comments

@marsupialtail
Copy link

I have a tensorflow saved model pb.

I would like to replace part of that pb (a subgraph) with a custom operator.

Is something like this feasible using this framework? If not currently I am willing to help contribute if in general this an be achieved.

@vlasenkoalexey
Copy link
Collaborator

Yes, it is definitely possible, in fact it is one of the main use cases for graph editor.

Also I realized that there are no good examples how to do this.
Probably this is the best one:

bias_add_node = g.add_node(batch_norm_node.name + "_bias_add", "BiasAdd",

The process is following:

  • Create a new node using: n = g.add_node(...)
  • Set inputs and attributes for the new node: n.set_inputs(...)
  • Replace output of an existing subgraph by an output from your node: reroute.reroute_ts(...)
  • Optionally remove old subgraph

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

No branches or pull requests

2 participants