tensorflow/core/grappler/optimizers/arithmetic_optimizer.cc
// True if all regular (non-control) inputs reference the same node or if there
// are no non-control inputs
True if all regular (non-control) inputs reference the same node or if there
are no non-control inputs
True if all regular ( non - control ) inputs reference the same node or if there are no non - control inputs
bool AllRegularInputsEqual(const NodeDef& node) {
  if (!HasRegularInputs(node)) return true;
  for (int i = 1; i < node.input_size(); ++i) {
    if (IsControlInput(node.input(i))) {
      break;
    }
    if (node.input(0) != node.input(i)) {
      return false;
    }
  }
  return true;
}
bool AllRegularInputsEqual ( const NodeDef & node ) { if ( ! HasRegularInputs ( node ) ) return true ; for ( int i = 1 ; i < node . input_size ( ) ; ++ i ) { if ( IsControlInput ( node . input ( i ) ) ) { break ; } if ( node . input ( 0 ) != node . input ( i ) ) { return false ; } } return true ; }
True if all regular (non-control) inputs reference the same node or if there
are no non-control inputs
True if all regular ( non - control ) inputs reference the same node or if there are no non - control inputs