tensorflow/tools/graph_transforms/fold_old_batch_norms.cc
// Ensures the tensor is the expected shape.
Ensures the tensor is the expected shape.
Ensures the tensor is the expected shape .
Status ErrorIfNotVector(const Tensor& input, const string& input_name,
                        int expected_width) {
  if ((input.shape().dims() != 1) ||
      (input.shape().dim_size(0) != expected_width)) {
    return errors::InvalidArgument(
        input_name,
        " input to batch norm has bad shape: ", input.shape().DebugString());
  }
  return Status::OK();
}
Status ErrorIfNotVector ( const Tensor & input , const string & input_name , int expected_width ) { if ( ( input . shape ( ) . dims ( ) != 1 ) || ( input . shape ( ) . dim_size ( 0 ) != expected_width ) ) { return errors :: InvalidArgument ( input_name , " " , input . shape ( ) . DebugString ( ) ) ; } return Status :: OK ( ) ; }
Ensures the tensor is the expected shape.
Ensures the tensor is the expected shape .