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

Handle duplicate items in collections #23

Closed BryanCutler closed 5 years ago

BryanCutler commented 5 years ago

This change removes the error raised if an item has already been added to a collection, and does nothing. This is required because TensorFlow does not treat collections as a set and allows duplicate entries.

Fixes #22

BryanCutler commented 5 years ago

@frreiss This change is one required to run LMS example cnn_mnist_lms.py. The alternative is to change collection from a set() to list() and allow the item to be added a second time. This seems to be what TensorFlow does, but I'm not sure if that what GDE should do.

frreiss commented 5 years ago

LGTM