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

Skip QueueRunner typed and Saver collections #28

Closed BryanCutler closed 5 years ago

BryanCutler commented 5 years ago

When calling _make_collection_def from a tf.Graph, skip collection queue_runners and savers.

Fixes #25

BryanCutler commented 5 years ago

@frreiss , I attempted to work with the QueueRunner type collection and was able to get the proto buf value for it, but I think it would some work to try to convert it back to a tf.Graph, and I'm not sure it's worth the effort. I believe you said queue runners were going away in tf 2.0?

The savers collection I came across did not have any items in it, so safe to skip, wdyt?

BryanCutler commented 5 years ago

@frreiss , I tried changing _make_collection_defs to extract the existing CollectionDefs from a MetaGraphDef instead of creating them from scratch. It passes all the tests, but I did rework the APIs a bit. WDYT?

frreiss commented 5 years ago

Is the example from the Large Model Support able to run training after this change?

BryanCutler commented 5 years ago

Is the example from the Large Model Support able to run training after this change?

Yes, the mnist example runs and the other 2 are able to load the graph in gde - just not run the new graph because it's edited under a callback, so needs in-place editing.

frreiss commented 5 years ago

OK, then I think we're good to go with this PR. Merging.

BryanCutler commented 5 years ago

Thanks @frreiss !