tensorflow/core/framework/full_type_inference_util.cc
// Note about error handling:
// For inputs which depend on the correctness of the op definition
// (i.e. if the op has three inputs, don't set an `i` that exceeds that),
// use DCHECK - an incorrect op def is considered a bug.
// Whereas for inputs that depend on the correctness of the graph (i.e. user
// used the correct ops), use Status - an incorrect graph is considered a user
// error.
Note about error handling:
For inputs which depend on the correctness of the op definition
,
use DCHECK - an incorrect op def is considered a bug.
Whereas for inputs that depend on the correctness of the graph , use Status - an incorrect graph is considered a user
error.
Note about error handling : For inputs which depend on the correctness of the op definition use DCHECK - an incorrect op def is considered a bug . Whereas for inputs that depend on the correctness of the graph use Status - an incorrect graph is considered a user error .
ForwardTypeInferenceFn ReplicateInput(int i, int n) {
  return [i, n](const TypeRefVector& input_types, const TypeRefMap& type_vars) {
    const FullTypeDef& in_type = input_types.at(i).get();
    FullTypeDef ret_type;
    if (in_type.type_id() != TFT_UNSET) {
      ret_type.set_type_id(TFT_PRODUCT);
      for (int k = 0; k < n; k++) {
        *(ret_type.add_args()) = in_type;
      }
    }
    return ret_type;
  };
}
ForwardTypeInferenceFn ReplicateInput ( int i , int n ) { return [ i , n ] ( const TypeRefVector & input_types , const TypeRefMap & type_vars ) { const FullTypeDef & in_type = input_types . at ( i ) . get ( ) ; FullTypeDef ret_type ; if ( in_type . type_id ( ) != TFT_UNSET ) { ret_type . set_type_id ( TFT_PRODUCT ) ; for ( int k = 0 ; k < n ; k ++ ) { * ( ret_type . add_args ( ) ) = in_type ; } } return ret_type ; } ; }
Note about error handling:
For inputs which depend on the correctness of the op definition
(i.e.
Note about error handling : For inputs which depend on the correctness of the op definition ( i . e .