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

Remove Identity nodes if num_inputs * num_outputs <= num_inputs + num_outputs....

Remove Identity nodes if num_inputs * num_outputs <= num_inputs + num_outputs. Exceptions are Identity nodes after Variable nodes, and Identity nodes after Switch nodes when removing the node would require anchoring a control dependency on the Switch.
Another exception is Identity nodes where inputs or outputs cross a device boundary, since we are not allowed to remove Identity nodes after _Recv that might be inserted in the graph later.

PiperOrigin-RevId: 183759826
parent a4b88a5b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment