neulab/docprompting-conala huggingface dataset:
tf.compat.v1.GPUOptions.Experimental A ProtocolMessage
 


 Attributes
  collective_ring_order   string collective_ring_order  
  kernel_tracker_max_bytes   int32 kernel_tracker_max_bytes  
  kernel_tracker_max_interval   int32 kernel_tracker_max_interval  
  kernel_tracker_max_pending   int32 kernel_tracker_max_pending  
  num_dev_to_dev_copy_streams   int32 num_dev_to_dev_copy_streams  
  timestamped_allocator   bool timestamped_allocator  
  use_unified_memory   bool use_unified_memory  
  virtual_devices   repeated VirtualDevices virtual_devices    Child Classes class VirtualDevices
tf.compat.v1.GPUOptions.Experimental.VirtualDevices A ProtocolMessage
 


 Attributes
  memory_limit_mb   repeated float memory_limit_mb  
  priority   repeated int32 priority
tf.compat.v1.GraphDef A ProtocolMessage
 


 Attributes
  library   FunctionDefLibrary library  
  node   repeated NodeDef node  
  version   int32 version  
  versions   VersionDef versions
tf.compat.v1.GraphKeys Standard names to use for graph collections. The standard library uses various well-known names to collect and retrieve values associated with a graph. For example, the tf.Optimizer subclasses default to optimizing the variables collected under tf.GraphKeys.TRAINABLE_VARIABLES if none is specified, but it is also possible to pass an explicit list of variables. The following standard keys are defined:  
GLOBAL_VARIABLES: the default collection of Variable objects, shared across distributed environment (model variables are subset of these). See tf.compat.v1.global_variables for more details. Commonly, all TRAINABLE_VARIABLES variables will be in MODEL_VARIABLES, and all MODEL_VARIABLES variables will be in GLOBAL_VARIABLES. 
LOCAL_VARIABLES: the subset of Variable objects that are local to each machine. Usually used for temporarily variables, like counters. Note: use tf.contrib.framework.local_variable to add to this collection. 
MODEL_VARIABLES: the subset of Variable objects that are used in the model for inference (feed forward). Note: use tf.contrib.framework.model_variable to add to this collection. 
TRAINABLE_VARIABLES: the subset of Variable objects that will be trained by an optimizer. See tf.compat.v1.trainable_variables for more details. 
SUMMARIES: the summary Tensor objects that have been created in the graph. See tf.compat.v1.summary.merge_all for more details. 
QUEUE_RUNNERS: the QueueRunner objects that are used to produce input for a computation. See tf.compat.v1.train.start_queue_runners for more details. 
MOVING_AVERAGE_VARIABLES: the subset of Variable objects that will also keep moving averages. See tf.compat.v1.moving_average_variables for more details. 
REGULARIZATION_LOSSES: regularization losses collected during graph construction.  The following standard keys are defined, but their collections are not automatically populated as many of the others are:  WEIGHTS BIASES ACTIVATIONS 
 


 Class Variables
  ACTIVATIONS   'activations'  
  ASSET_FILEPATHS   'asset_filepaths'  
  BIASES   'biases'  
  CONCATENATED_VARIABLES   'concatenated_variables'  
  COND_CONTEXT   'cond_context'  
  EVAL_STEP   'eval_step'  
  GLOBAL_STEP   'global_step'  
  GLOBAL_VARIABLES   'variables'  
  INIT_OP   'init_op'  
  LOCAL_INIT_OP   'local_init_op'  
  LOCAL_RESOURCES   'local_resources'  
  LOCAL_VARIABLES   'local_variables'  
  LOSSES   'losses'  
  METRIC_VARIABLES   'metric_variables'  
  MODEL_VARIABLES   'model_variables'  
  MOVING_AVERAGE_VARIABLES   'moving_average_variables'  
  QUEUE_RUNNERS   'queue_runners'  
  READY_FOR_LOCAL_INIT_OP   'ready_for_local_init_op'  
  READY_OP   'ready_op'  
  REGULARIZATION_LOSSES   'regularization_losses'  
  RESOURCES   'resources'  
  SAVEABLE_OBJECTS   'saveable_objects'  
  SAVERS   'savers'  
  SUMMARIES   'summaries'  
  SUMMARY_OP   'summary_op'  
  TABLE_INITIALIZERS   'table_initializer'  
  TRAINABLE_RESOURCE_VARIABLES   'trainable_resource_variables'  
  TRAINABLE_VARIABLES   'trainable_variables'  
  TRAIN_OP   'train_op'  
  UPDATE_OPS   'update_ops'  
  VARIABLES   'variables'  
  WEIGHTS   'weights'  
  WHILE_CONTEXT   'while_context'
tf.compat.v1.GraphOptions A ProtocolMessage
 


 Attributes
  build_cost_model   int64 build_cost_model  
  build_cost_model_after   int64 build_cost_model_after  
  enable_bfloat16_sendrecv   bool enable_bfloat16_sendrecv  
  enable_recv_scheduling   bool enable_recv_scheduling  
  infer_shapes   bool infer_shapes  
  optimizer_options   OptimizerOptions optimizer_options  
  place_pruned_graph   bool place_pruned_graph  
  rewrite_options   RewriterConfig rewrite_options  
  timeline_step   int32 timeline_step
Module: tf.compat.v1.graph_util Helpers to manipulate a tensor graph in python. Functions convert_variables_to_constants(...): Replaces all the variables in a graph with constants of the same values. (deprecated) extract_sub_graph(...): Extract the subgraph that can reach any of the nodes in 'dest_nodes'. (deprecated) import_graph_def(...): Imports the graph from graph_def into the current default Graph. (deprecated arguments) must_run_on_cpu(...): Returns True if the given node_def must run on CPU, otherwise False. (deprecated) remove_training_nodes(...): Prunes out nodes that aren't needed for inference. (deprecated) tensor_shape_from_node_def_name(...): Convenience function to get a shape from a NodeDef's input string. (deprecated)
tf.compat.v1.graph_util.convert_variables_to_constants Replaces all the variables in a graph with constants of the same values. (deprecated) 
tf.compat.v1.graph_util.convert_variables_to_constants(
    sess, input_graph_def, output_node_names, variable_names_whitelist=None,
    variable_names_blacklist=None
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.compat.v1.graph_util.convert_variables_to_constants If you have a trained graph containing Variable ops, it can be convenient to convert them all to Const ops holding the same values. This makes it possible to describe the network fully with a single GraphDef file, and allows the removal of a lot of ops related to loading and saving the variables.
 


 Args
  sess   Active TensorFlow session containing the variables.  
  input_graph_def   GraphDef object holding the network.  
  output_node_names   List of name strings for the result nodes of the graph.  
  variable_names_whitelist   The set of variable names to convert (by default, all variables are converted).  
  variable_names_blacklist   The set of variable names to omit converting to constants.   
 


 Returns   GraphDef containing a simplified version of the original.  

 


 Raises
  RuntimeError   if a DT_RESOURCE op is found whose ancestor Variables are both denylisted AND whitelisted for freezing.
tf.compat.v1.graph_util.extract_sub_graph Extract the subgraph that can reach any of the nodes in 'dest_nodes'. (deprecated) 
tf.compat.v1.graph_util.extract_sub_graph(
    graph_def, dest_nodes
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.compat.v1.graph_util.extract_sub_graph
 


 Args
  graph_def   A graph_pb2.GraphDef proto.  
  dest_nodes   A list of strings specifying the destination node names.   
 


 Returns   The GraphDef of the sub-graph.  

 


 Raises
  TypeError   If 'graph_def' is not a graph_pb2.GraphDef proto.
tf.compat.v1.graph_util.must_run_on_cpu Returns True if the given node_def must run on CPU, otherwise False. (deprecated) 
tf.compat.v1.graph_util.must_run_on_cpu(
    node, pin_variables_on_cpu=False
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.compat.v1.graph_util.must_run_on_cpu
 


 Args
  node   The node to be assigned to a device. Could be either an ops.Operation or NodeDef.  
  pin_variables_on_cpu   If True, this function will return False if node_def represents a variable-related op.   
 


 Returns   True if the given node must run on CPU, otherwise False.
tf.compat.v1.graph_util.remove_training_nodes Prunes out nodes that aren't needed for inference. (deprecated) 
tf.compat.v1.graph_util.remove_training_nodes(
    input_graph, protected_nodes=None
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.compat.v1.graph_util.remove_training_nodes There are nodes like Identity and CheckNumerics that are only useful during training, and can be removed in graphs that will be used for nothing but inference. Here we identify and remove them, returning an equivalent graph. To be specific, CheckNumerics nodes are always removed, and Identity nodes that aren't involved in control edges are spliced out so that their input and outputs are directly connected.
 


 Args
  input_graph   Model to analyze and prune.  
  protected_nodes   An optional list of names of nodes to be kept unconditionally. This is for example useful to preserve Identity output nodes.   
 


 Returns   A list of nodes with the unnecessary ones removed.
tf.compat.v1.graph_util.tensor_shape_from_node_def_name Convenience function to get a shape from a NodeDef's input string. (deprecated) 
tf.compat.v1.graph_util.tensor_shape_from_node_def_name(
    graph, input_name
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.compat.v1.graph_util.tensor_shape_from_node_def_name
tf.compat.v1.hessians Constructs the Hessian of sum of ys with respect to x in xs. 
tf.compat.v1.hessians(
    ys, xs, name='hessians', colocate_gradients_with_ops=False,
    gate_gradients=False, aggregation_method=None
)
 hessians() adds ops to the graph to output the Hessian matrix of ys with respect to xs. It returns a list of Tensor of length len(xs) where each tensor is the Hessian of sum(ys). The Hessian is a matrix of second-order partial derivatives of a scalar tensor (see https://en.wikipedia.org/wiki/Hessian_matrix for more details).
 


 Args
  ys   A Tensor or list of tensors to be differentiated.  
  xs   A Tensor or list of tensors to be used for differentiation.  
  name   Optional name to use for grouping all the gradient ops together. defaults to 'hessians'.  
  colocate_gradients_with_ops   See gradients() documentation for details.  
  gate_gradients   See gradients() documentation for details.  
  aggregation_method   See gradients() documentation for details.   
 


 Returns   A list of Hessian matrices of sum(ys) for each x in xs.  

 


 Raises
  LookupError   if one of the operations between xs and ys does not have a registered gradient function.
tf.compat.v1.HistogramProto A ProtocolMessage
 


 Attributes
  bucket   repeated double bucket  
  bucket_limit   repeated double bucket_limit  
  max   double max  
  min   double min  
  num   double num  
  sum   double sum  
  sum_squares   double sum_squares
tf.compat.v1.image.crop_and_resize Extracts crops from the input image tensor and resizes them. 
tf.compat.v1.image.crop_and_resize(
    image, boxes, box_ind=None, crop_size=None, method='bilinear',
    extrapolation_value=0, name=None, box_indices=None
)
 Extracts crops from the input image tensor and resizes them using bilinear sampling or nearest neighbor sampling (possibly with aspect ratio change) to a common output size specified by crop_size. This is more general than the crop_to_bounding_box op which extracts a fixed size slice from the input image and does not allow resizing or aspect ratio change. Returns a tensor with crops from the input image at positions defined at the bounding box locations in boxes. The cropped boxes are all resized (with bilinear or nearest neighbor interpolation) to a fixed size = [crop_height, crop_width]. The result is a 4-D tensor [num_boxes, crop_height, crop_width, depth]. The resizing is corner aligned. In particular, if boxes = [[0, 0, 1, 1]], the method will give identical results to using tf.image.resize_bilinear() or tf.image.resize_nearest_neighbor()(depends on the method argument) with align_corners=True.
 


 Args
  image   A Tensor. Must be one of the following types: uint8, uint16, int8, int16, int32, int64, half, float32, float64. A 4-D tensor of shape [batch, image_height, image_width, depth]. Both image_height and image_width need to be positive.  
  boxes   A Tensor of type float32. A 2-D tensor of shape [num_boxes, 4]. The i-th row of the tensor specifies the coordinates of a box in the box_ind[i] image and is specified in normalized coordinates [y1, x1, y2, x2]. A normalized coordinate value of y is mapped to the image coordinate at y * (image_height - 1), so as the [0, 1] interval of normalized image height is mapped to [0, image_height - 1] in image height coordinates. We do allow y1 > y2, in which case the sampled crop is an up-down flipped version of the original image. The width dimension is treated similarly. Normalized coordinates outside the [0, 1] range are allowed, in which case we use extrapolation_value to extrapolate the input image values.  
  box_ind   A Tensor of type int32. A 1-D tensor of shape [num_boxes] with int32 values in [0, batch). The value of box_ind[i] specifies the image that the i-th box refers to.  
  crop_size   A Tensor of type int32. A 1-D tensor of 2 elements, size = [crop_height, crop_width]. All cropped image patches are resized to this size. The aspect ratio of the image content is not preserved. Both crop_height and crop_width need to be positive.  
  method   An optional string from: "bilinear", "nearest". Defaults to "bilinear". A string specifying the sampling method for resizing. It can be either "bilinear" or "nearest" and default to "bilinear". Currently two sampling methods are supported: Bilinear and Nearest Neighbor.  
  extrapolation_value   An optional float. Defaults to 0. Value used for extrapolation, when applicable.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type float32.
tf.compat.v1.image.draw_bounding_boxes Draw bounding boxes on a batch of images. 
tf.compat.v1.image.draw_bounding_boxes(
    images, boxes, name=None, colors=None
)
 Outputs a copy of images but draws on top of the pixels zero or more bounding boxes specified by the locations in boxes. The coordinates of the each bounding box in boxes are encoded as [y_min, x_min, y_max, x_max]. The bounding box coordinates are floats in [0.0, 1.0] relative to the width and the height of the underlying image. For example, if an image is 100 x 200 pixels (height x width) and the bounding box is [0.1, 0.2, 0.5, 0.9], the upper-left and bottom-right coordinates of the bounding box will be (40, 10) to (180, 50) (in (x,y) coordinates). Parts of the bounding box may fall outside the image.
 


 Args
  images   A Tensor. Must be one of the following types: float32, half. 4-D with shape [batch, height, width, depth]. A batch of images.  
  boxes   A Tensor of type float32. 3-D with shape [batch, num_bounding_boxes, 4] containing bounding boxes.  
  name   A name for the operation (optional).  
  colors   A Tensor of type float32. 2-D. A list of RGBA colors to cycle through for the boxes.   
 


 Returns   A Tensor. Has the same type as images.  
 Usage Example: 
# create an empty image
img = tf.zeros([1, 3, 3, 3])
# draw a box around the image
box = np.array([0, 0, 1, 1])
boxes = box.reshape([1, 1, 4])
# alternate between red and blue
colors = np.array([[1.0, 0.0, 0.0], [0.0, 0.0, 1.0]])
tf.image.draw_bounding_boxes(img, boxes, colors)
<tf.Tensor: shape=(1, 3, 3, 3), dtype=float32, numpy=
array([[[[1., 0., 0.],
        [1., 0., 0.],
        [1., 0., 0.]],
        [[1., 0., 0.],
        [0., 0., 0.],
        [1., 0., 0.]],
        [[1., 0., 0.],
        [1., 0., 0.],
        [1., 0., 0.]]]], dtype=float32)>
tf.compat.v1.image.extract_glimpse Extracts a glimpse from the input tensor. 
tf.compat.v1.image.extract_glimpse(
    input, size, offsets, centered=True, normalized=True, uniform_noise=True,
    name=None
)
 Returns a set of windows called glimpses extracted at location offsets from the input tensor. If the windows only partially overlaps the inputs, the non-overlapping areas will be filled with random noise. The result is a 4-D tensor of shape [batch_size, glimpse_height, glimpse_width, channels]. The channels and batch dimensions are the same as that of the input tensor. The height and width of the output windows are specified in the size parameter. The argument normalized and centered controls how the windows are built:  If the coordinates are normalized but not centered, 0.0 and 1.0 correspond to the minimum and maximum of each height and width dimension. If the coordinates are both normalized and centered, they range from -1.0 to 1.0. The coordinates (-1.0, -1.0) correspond to the upper left corner, the lower right corner is located at (1.0, 1.0) and the center is at (0, 0). If the coordinates are not normalized they are interpreted as numbers of pixels.  Usage Example: 
x = [[[[0.0],
          [1.0],
          [2.0]],
         [[3.0],
          [4.0],
          [5.0]],
         [[6.0],
          [7.0],
          [8.0]]]]
tf.compat.v1.image.extract_glimpse(x, size=(2, 2), offsets=[[1, 1]],
                                   centered=False, normalized=False)
<tf.Tensor: shape=(1, 2, 2, 1), dtype=float32, numpy=
array([[[[0.],
         [1.]],
        [[3.],
         [4.]]]], dtype=float32)>

 


 Args
  input   A Tensor of type float32. A 4-D float tensor of shape [batch_size, height, width, channels].  
  size   A Tensor of type int32. A 1-D tensor of 2 elements containing the size of the glimpses to extract. The glimpse height must be specified first, following by the glimpse width.  
  offsets   A Tensor of type float32. A 2-D integer tensor of shape [batch_size, 2] containing the y, x locations of the center of each window.  
  centered   An optional bool. Defaults to True. indicates if the offset coordinates are centered relative to the image, in which case the (0, 0) offset is relative to the center of the input images. If false, the (0,0) offset corresponds to the upper left corner of the input images.  
  normalized   An optional bool. Defaults to True. indicates if the offset coordinates are normalized.  
  uniform_noise   An optional bool. Defaults to True. indicates if the noise should be generated using a uniform distribution or a Gaussian distribution.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type float32.
tf.compat.v1.image.resize Resize images to size using the specified method.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.image.resize_images  
tf.compat.v1.image.resize(
    images, size, method=ResizeMethodV1.BILINEAR, align_corners=False,
    preserve_aspect_ratio=False, name=None
)
 Resized images will be distorted if their original aspect ratio is not the same as size. To avoid distortions see tf.image.resize_with_pad or tf.image.resize_with_crop_or_pad. The method can be one of:  
tf.image.ResizeMethod.BILINEAR: Bilinear interpolation.
 
tf.image.ResizeMethod.NEAREST_NEIGHBOR:  Nearest neighbor interpolation.
 
tf.image.ResizeMethod.BICUBIC: Bicubic interpolation.
 
tf.image.ResizeMethod.AREA: Area interpolation.  The return value has the same type as images if method is tf.image.ResizeMethod.NEAREST_NEIGHBOR. It will also have the same type as images if the size of images can be statically determined to be the same as size, because images is returned in this case. Otherwise, the return value has type float32.
 


 Args
  images   4-D Tensor of shape [batch, height, width, channels] or 3-D Tensor of shape [height, width, channels].  
  size   A 1-D int32 Tensor of 2 elements: new_height, new_width. The new size for the images.  
  method   ResizeMethod. Defaults to tf.image.ResizeMethod.BILINEAR.  
  align_corners   bool. If True, the centers of the 4 corner pixels of the input and output tensors are aligned, preserving the values at the corner pixels. Defaults to False.  
  preserve_aspect_ratio   Whether to preserve the aspect ratio. If this is set, then images will be resized to a size that fits in size while preserving the aspect ratio of the original image. Scales up the image if size is bigger than the current size of the image. Defaults to False.  
  name   A name for this operation (optional).   
 


 Raises
  ValueError   if the shape of images is incompatible with the shape arguments to this function  
  ValueError   if size has invalid shape or type.  
  ValueError   if an unsupported resize method is specified.   
 


 Returns   If images was 4-D, a 4-D float Tensor of shape [batch, new_height, new_width, channels]. If images was 3-D, a 3-D float Tensor of shape [new_height, new_width, channels].
tf.compat.v1.image.ResizeMethod See v1.image.resize for details.
 


 Class Variables
  AREA   3  
  BICUBIC   2  
  BILINEAR   0  
  NEAREST_NEIGHBOR   1
tf.compat.v1.image.resize_area Resize images to size using area interpolation. 
tf.compat.v1.image.resize_area(
    images, size, align_corners=False, name=None
)
 Input images can be of different types but output images are always float. The range of pixel values for the output image might be slightly different from the range for the input image because of limited numerical precision. To guarantee an output range, for example [0.0, 1.0], apply tf.clip_by_value to the output. Each output pixel is computed by first transforming the pixel's footprint into the input tensor and then averaging the pixels that intersect the footprint. An input pixel's contribution to the average is weighted by the fraction of its area that intersects the footprint. This is the same as OpenCV's INTER_AREA.
 


 Args
  images   A Tensor. Must be one of the following types: int8, uint8, int16, uint16, int32, int64, half, float32, float64, bfloat16. 4-D with shape [batch, height, width, channels].  
  size   A 1-D int32 Tensor of 2 elements: new_height, new_width. The new size for the images.  
  align_corners   An optional bool. Defaults to False. If true, the centers of the 4 corner pixels of the input and output tensors are aligned, preserving the values at the corner pixels. Defaults to false.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type float32.
tf.compat.v1.image.resize_bicubic 
tf.compat.v1.image.resize_bicubic(
    images, size, align_corners=False, name=None, half_pixel_centers=False
)
tf.compat.v1.image.resize_bilinear 
tf.compat.v1.image.resize_bilinear(
    images, size, align_corners=False, name=None, half_pixel_centers=False
)
tf.compat.v1.image.resize_image_with_pad Resizes and pads an image to a target width and height. 
tf.compat.v1.image.resize_image_with_pad(
    image, target_height, target_width, method=ResizeMethodV1.BILINEAR,
    align_corners=False
)
 Resizes an image to a target width and height by keeping the aspect ratio the same without distortion. If the target dimensions don't match the image dimensions, the image is resized and then padded with zeroes to match requested dimensions.
 


 Args
  image   4-D Tensor of shape [batch, height, width, channels] or 3-D Tensor of shape [height, width, channels].  
  target_height   Target height.  
  target_width   Target width.  
  method   Method to use for resizing image. See resize_images()  
  align_corners   bool. If True, the centers of the 4 corner pixels of the input and output tensors are aligned, preserving the values at the corner pixels. Defaults to False.   
 


 Raises
  ValueError   if target_height or target_width are zero or negative.   
 


 Returns   Resized and padded image. If images was 4-D, a 4-D float Tensor of shape [batch, new_height, new_width, channels]. If images was 3-D, a 3-D float Tensor of shape [new_height, new_width, channels].
tf.compat.v1.image.resize_nearest_neighbor 
tf.compat.v1.image.resize_nearest_neighbor(
    images, size, align_corners=False, name=None, half_pixel_centers=False
)