Improve model_pruner:
* Actually remove nodes marked for removal if fetches are known.
* Remove trivial nodes even in the presence of control inputs, except
for Identity nodes when
a) they are anchored on an Identity following a Switch node and
removal would require anchoring a control identity on the Switch, or
b) they have control inputs and feed a Merge node.
* Remove nodes only when in_degree * out_degree <= in_degree + out_degree.
Move input deduping utility function to utils.{h,cc}.
PiperOrigin-RevId: 184858685
Loading
Please sign in to comment