CODAIT / graph_def_editor

GraphDef Editor: A port of the TensorFlow contrib.graph_editor package that operates over serialized graphs
Apache License 2.0
31 stars 16 forks source link

is the following operation possible #45

Open marsupialtail opened 3 years ago

marsupialtail commented 3 years ago

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 commented 3 years ago

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: https://github.com/CODAIT/graph_def_editor/blob/f3e0c8553067a3119a245ce4b8dbcc487c2fe2b2/graph_def_editor/rewrite.py#L377

The process is following: