Commit 0e3b2b58 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower Committed by TensorFlower Gardener
Browse files

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
parent f6010282
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment