neulab/docprompting-conala huggingface dataset:
Module: tf.compat.v1.summary Operations for writing summary data, for use in analysis and visualization. See the Summaries and TensorBoard guide. Classes class Event: A ProtocolMessage class FileWriter: Writes Summary protocol buffers to event files. class FileWriterCache: Cache for file writers. class SessionLog: A ProtocolMessage class Summary: A ProtocolMessage class SummaryDescription: A ProtocolMessage class TaggedRunMetadata: A ProtocolMessage Functions all_v2_summary_ops(...): Returns all V2-style summary ops defined in the current default graph. audio(...): Outputs a Summary protocol buffer with audio. get_summary_description(...): Given a TensorSummary node_def, retrieve its SummaryDescription. histogram(...): Outputs a Summary protocol buffer with a histogram. image(...): Outputs a Summary protocol buffer with images. initialize(...): Initializes summary writing for graph execution mode. merge(...): Merges summaries. merge_all(...): Merges all summaries collected in the default graph. scalar(...): Outputs a Summary protocol buffer containing a single scalar value. tensor_summary(...): Outputs a Summary protocol buffer with a serialized tensor.proto. text(...): Summarizes textual data.
tf.compat.v1.summary.all_v2_summary_ops Returns all V2-style summary ops defined in the current default graph. 
tf.compat.v1.summary.all_v2_summary_ops()
 This includes ops from TF 2.0 tf.summary and TF 1.x tf.contrib.summary (except for tf.contrib.summary.graph and tf.contrib.summary.import_event), but does not include TF 1.x tf.summary ops.
 


 Returns   List of summary ops, or None if called under eager execution.
tf.compat.v1.summary.audio Outputs a Summary protocol buffer with audio. 
tf.compat.v1.summary.audio(
    name, tensor, sample_rate, max_outputs=3, collections=None, family=None
)
 The summary has up to max_outputs summary values containing audio. The audio is built from tensor which must be 3-D with shape [batch_size, frames, channels] or 2-D with shape [batch_size, frames]. The values are assumed to be in the range of [-1.0, 1.0] with a sample rate of sample_rate. The tag in the outputted Summary.Value protobufs is generated based on the name, with a suffix depending on the max_outputs setting:  If max_outputs is 1, the summary value tag is 'name/audio'. If max_outputs is greater than 1, the summary value tags are generated sequentially as 'name/audio/0', 'name/audio/1', etc 
 


 Args
  name   A name for the generated node. Will also serve as a series name in TensorBoard.  
  tensor   A 3-D float32 Tensor of shape [batch_size, frames, channels] or a 2-D float32 Tensor of shape [batch_size, frames].  
  sample_rate   A Scalar float32 Tensor indicating the sample rate of the signal in hertz.  
  max_outputs   Max number of batch elements to generate audio for.  
  collections   Optional list of ops.GraphKeys. The collections to add the summary to. Defaults to [_ops.GraphKeys.SUMMARIES]  
  family   Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.   
 


 Returns   A scalar Tensor of type string. The serialized Summary protocol buffer.
tf.compat.v1.summary.FileWriterCache Cache for file writers. This class caches file writers, one per directory. Methods clear View source 
@staticmethod
clear()
 Clear cached summary writers. Currently only used for unit tests. get View source 
@staticmethod
get(
    logdir
)
 Returns the FileWriter for the specified directory.
 


 Args
  logdir   str, name of the directory.   
 


 Returns   A FileWriter.
tf.compat.v1.summary.get_summary_description Given a TensorSummary node_def, retrieve its SummaryDescription. 
tf.compat.v1.summary.get_summary_description(
    node_def
)
 When a Summary op is instantiated, a SummaryDescription of associated metadata is stored in its NodeDef. This method retrieves the description.
 


 Args
  node_def   the node_def_pb2.NodeDef of a TensorSummary op   
 


 Returns   a summary_pb2.SummaryDescription  

 


 Raises
  ValueError   if the node is not a summary op.    Eager Compatibility Not compatible with eager execution. To write TensorBoard summaries under eager execution, use tf.contrib.summary instead.
tf.compat.v1.summary.histogram Outputs a Summary protocol buffer with a histogram. 
tf.compat.v1.summary.histogram(
    name, values, collections=None, family=None
)
 Adding a histogram summary makes it possible to visualize your data's distribution in TensorBoard. You can see a detailed explanation of the TensorBoard histogram dashboard here. The generated Summary has one summary value containing a histogram for values. This op reports an InvalidArgument error if any value is not finite.
 


 Args
  name   A name for the generated node. Will also serve as a series name in TensorBoard.  
  values   A real numeric Tensor. Any shape. Values to use to build the histogram.  
  collections   Optional list of graph collections keys. The new summary op is added to these collections. Defaults to [GraphKeys.SUMMARIES].  
  family   Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.   
 


 Returns   A scalar Tensor of type string. The serialized Summary protocol buffer.
tf.compat.v1.summary.image Outputs a Summary protocol buffer with images. 
tf.compat.v1.summary.image(
    name, tensor, max_outputs=3, collections=None, family=None
)
 The summary has up to max_outputs summary values containing images. The images are built from tensor which must be 4-D with shape [batch_size, height, width, channels] and where channels can be:  1: tensor is interpreted as Grayscale. 3: tensor is interpreted as RGB. 4: tensor is interpreted as RGBA.  The images have the same number of channels as the input tensor. For float input, the values are normalized one image at a time to fit in the range [0, 255]. uint8 values are unchanged. The op uses two different normalization algorithms:  If the input values are all positive, they are rescaled so the largest one is 255. If any input value is negative, the values are shifted so input value 0.0 is at 127. They are then rescaled so that either the smallest value is 0, or the largest one is 255.  The tag in the outputted Summary.Value protobufs is generated based on the name, with a suffix depending on the max_outputs setting:  If max_outputs is 1, the summary value tag is 'name/image'. If max_outputs is greater than 1, the summary value tags are generated sequentially as 'name/image/0', 'name/image/1', etc. 
 


 Args
  name   A name for the generated node. Will also serve as a series name in TensorBoard.  
  tensor   A 4-D uint8 or float32 Tensor of shape [batch_size, height, width, channels] where channels is 1, 3, or 4.  
  max_outputs   Max number of batch elements to generate images for.  
  collections   Optional list of ops.GraphKeys. The collections to add the summary to. Defaults to [_ops.GraphKeys.SUMMARIES]  
  family   Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.   
 


 Returns   A scalar Tensor of type string. The serialized Summary protocol buffer.
tf.compat.v1.summary.initialize Initializes summary writing for graph execution mode. 
tf.compat.v1.summary.initialize(
    graph=None, session=None
)
 This operation is a no-op when executing eagerly. This helper method provides a higher-level alternative to using tf.contrib.summary.summary_writer_initializer_op and tf.contrib.summary.graph. Most users will also want to call tf.compat.v1.train.create_global_step which can happen before or after this function is called.
 


 Args
  graph   A tf.Graph or tf.compat.v1.GraphDef to output to the writer. This function will not write the default graph by default. When writing to an event log file, the associated step will be zero.  
  session   So this method can call tf.Session.run. This defaults to tf.compat.v1.get_default_session.   
 


 Raises
  RuntimeError   If the current thread has no default tf.contrib.summary.SummaryWriter.  
  ValueError   If session wasn't passed and no default session.
tf.compat.v1.summary.merge Merges summaries. 
tf.compat.v1.summary.merge(
    inputs, collections=None, name=None
)
 This op creates a Summary protocol buffer that contains the union of all the values in the input summaries. When the Op is run, it reports an InvalidArgument error if multiple values in the summaries to merge use the same tag.
 


 Args
  inputs   A list of string Tensor objects containing serialized Summary protocol buffers.  
  collections   Optional list of graph collections keys. The new summary op is added to these collections. Defaults to [].  
  name   A name for the operation (optional).   
 


 Returns   A scalar Tensor of type string. The serialized Summary protocol buffer resulting from the merging.  

 


 Raises
  RuntimeError   If called with eager mode enabled.    Eager Compatibility Not compatible with eager execution. To write TensorBoard summaries under eager execution, use tf.contrib.summary instead.
tf.compat.v1.summary.merge_all Merges all summaries collected in the default graph. 
tf.compat.v1.summary.merge_all(
    key=tf.GraphKeys.SUMMARIES, scope=None, name=None
)

 


 Args
  key   GraphKey used to collect the summaries. Defaults to GraphKeys.SUMMARIES.  
  scope   Optional scope used to filter the summary ops, using re.match   
 


 Returns   If no summaries were collected, returns None. Otherwise returns a scalar Tensor of type string containing the serialized Summary protocol buffer resulting from the merging.  

 


 Raises
  RuntimeError   If called with eager execution enabled.    Eager Compatibility Not compatible with eager execution. To write TensorBoard summaries under eager execution, use tf.contrib.summary instead.
tf.compat.v1.summary.scalar Outputs a Summary protocol buffer containing a single scalar value. 
tf.compat.v1.summary.scalar(
    name, tensor, collections=None, family=None
)
 The generated Summary has a Tensor.proto containing the input Tensor.
 


 Args
  name   A name for the generated node. Will also serve as the series name in TensorBoard.  
  tensor   A real numeric Tensor containing a single value.  
  collections   Optional list of graph collections keys. The new summary op is added to these collections. Defaults to [GraphKeys.SUMMARIES].  
  family   Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.   
 


 Returns   A scalar Tensor of type string. Which contains a Summary protobuf.  

 


 Raises
  ValueError   If tensor has the wrong shape or type.
tf.compat.v1.summary.SummaryDescription A ProtocolMessage
 


 Attributes
  type_hint   string type_hint
tf.compat.v1.summary.TaggedRunMetadata A ProtocolMessage
 


 Attributes
  run_metadata   bytes run_metadata  
  tag   string tag
tf.compat.v1.summary.tensor_summary Outputs a Summary protocol buffer with a serialized tensor.proto. 
tf.compat.v1.summary.tensor_summary(
    name, tensor, summary_description=None, collections=None, summary_metadata=None,
    family=None, display_name=None
)

 


 Args
  name   A name for the generated node. If display_name is not set, it will also serve as the tag name in TensorBoard. (In that case, the tag name will inherit tf name scopes.)  
  tensor   A tensor of any type and shape to serialize.  
  summary_description   A long description of the summary sequence. Markdown is supported.  
  collections   Optional list of graph collections keys. The new summary op is added to these collections. Defaults to [GraphKeys.SUMMARIES].  
  summary_metadata   Optional SummaryMetadata proto (which describes which plugins may use the summary value).  
  family   Optional; if provided, used as the prefix of the summary tag, which controls the name used for display on TensorBoard when display_name is not set.  
  display_name   A string used to name this data in TensorBoard. If this is not set, then the node name will be used instead.   
 


 Returns   A scalar Tensor of type string. The serialized Summary protocol buffer.
tf.compat.v1.summary.text Summarizes textual data. 
tf.compat.v1.summary.text(
    name, tensor, collections=None
)
 Text data summarized via this plugin will be visible in the Text Dashboard in TensorBoard. The standard TensorBoard Text Dashboard will render markdown in the strings, and will automatically organize 1d and 2d tensors into tables. If a tensor with more than 2 dimensions is provided, a 2d subarray will be displayed along with a warning message. (Note that this behavior is not intrinsic to the text summary api, but rather to the default TensorBoard text plugin.)
 


 Args
  name   A name for the generated node. Will also serve as a series name in TensorBoard.  
  tensor   a string-type Tensor to summarize.  
  collections   Optional list of ops.GraphKeys. The collections to add the summary to. Defaults to [_ops.GraphKeys.SUMMARIES]   
 


 Returns   A TensorSummary op that is configured so that TensorBoard will recognize that it contains textual data. The TensorSummary is a scalar Tensor of type string which contains Summary protobufs.  

 


 Raises
  ValueError   If tensor has the wrong type.
tf.compat.v1.SummaryMetadata A ProtocolMessage
 


 Attributes
  data_class   DataClass data_class  
  display_name   string display_name  
  plugin_data   PluginData plugin_data  
  summary_description   string summary_description    Child Classes class PluginData
tf.compat.v1.SummaryMetadata.PluginData A ProtocolMessage
 


 Attributes
  content   bytes content  
  plugin_name   string plugin_name
Module: tf.compat.v1.sysconfig System configuration library. Functions get_build_info(...): Get a dictionary describing TensorFlow's build environment. get_compile_flags(...): Get the compilation flags for custom operators. get_include(...): Get the directory containing the TensorFlow C++ header files. get_lib(...): Get the directory containing the TensorFlow framework library. get_link_flags(...): Get the link flags for custom operators.
 


 Other Members
  CXX11_ABI_FLAG   0  
  MONOLITHIC_BUILD   0
tf.compat.v1.tables_initializer Returns an Op that initializes all tables of the default graph.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.initializers.tables_initializer  
tf.compat.v1.tables_initializer(
    name='init_all_tables'
)
 See the Low Level Intro guide, for an example of usage.
 


 Args
  name   Optional name for the initialization op.   
 


 Returns   An Op that initializes all tables. Note that if there are not tables the returned Op is a NoOp.
tf.compat.v1.TensorInfo A ProtocolMessage
 


 Attributes
  composite_tensor   CompositeTensor composite_tensor  
  coo_sparse   CooSparse coo_sparse  
  dtype   DataType dtype  
  name   string name  
  tensor_shape   TensorShapeProto tensor_shape    Child Classes class CompositeTensor class CooSparse
tf.compat.v1.TensorInfo.CompositeTensor A ProtocolMessage
 


 Attributes
  components   repeated TensorInfo components  
  type_spec   TypeSpecProto type_spec
tf.compat.v1.TensorInfo.CooSparse A ProtocolMessage
 


 Attributes
  dense_shape_tensor_name   string dense_shape_tensor_name  
  indices_tensor_name   string indices_tensor_name  
  values_tensor_name   string values_tensor_name
Module: tf.compat.v1.test Testing. Classes class Benchmark: Abstract class that provides helpers for TensorFlow benchmarks. class StubOutForTesting: Support class for stubbing methods out for unit testing. class TestCase: Base class for tests that need to test TensorFlow. Functions assert_equal_graph_def(...): Asserts that two GraphDefs are (mostly) the same. benchmark_config(...): Returns a tf.compat.v1.ConfigProto for disabling the dependency optimizer. compute_gradient(...): Computes and returns the theoretical and numerical Jacobian. (deprecated) compute_gradient_error(...): Computes the gradient error. (deprecated) create_local_cluster(...): Create and start local servers and return the associated Server objects. get_temp_dir(...): Returns a temporary directory for use during tests. gpu_device_name(...): Returns the name of a GPU device if available or the empty string. is_built_with_cuda(...): Returns whether TensorFlow was built with CUDA (GPU) support. is_built_with_gpu_support(...): Returns whether TensorFlow was built with GPU (i.e. CUDA or ROCm) support. is_built_with_rocm(...): Returns whether TensorFlow was built with ROCm (GPU) support. is_built_with_xla(...): Returns whether TensorFlow was built with XLA support. is_gpu_available(...): Returns whether TensorFlow can access a GPU. (deprecated) main(...): Runs all unit tests. test_src_dir_path(...): Creates an absolute test srcdir path given a relative path.
tf.compat.v1.test.assert_equal_graph_def Asserts that two GraphDefs are (mostly) the same. 
tf.compat.v1.test.assert_equal_graph_def(
    actual, expected, checkpoint_v2=False, hash_table_shared_name=False
)
 Compares two GraphDef protos for equality, ignoring versions and ordering of nodes, attrs, and control inputs. Node names are used to match up nodes between the graphs, so the naming of nodes must be consistent.
 


 Args
  actual   The GraphDef we have.  
  expected   The GraphDef we expected.  
  checkpoint_v2   boolean determining whether to ignore randomized attribute values that appear in V2 checkpoints.  
  hash_table_shared_name   boolean determining whether to ignore randomized shared_names that appear in HashTableV2 op defs.   
 


 Raises
  AssertionError   If the GraphDefs do not match.  
  TypeError   If either argument is not a GraphDef.
tf.compat.v1.test.compute_gradient Computes and returns the theoretical and numerical Jacobian. (deprecated) 
tf.compat.v1.test.compute_gradient(
    x, x_shape, y, y_shape, x_init_value=None, delta=0.001, init_targets=None,
    extra_feed_dict=None
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.test.compute_gradient in 2.0, which has better support for functions. Note that the two versions have different usage, so code change is needed. If x or y is complex, the Jacobian will still be real but the corresponding Jacobian dimension(s) will be twice as large. This is required even if both input and output is complex since TensorFlow graphs are not necessarily holomorphic, and may have gradients not expressible as complex numbers. For example, if x is complex with shape [m] and y is complex with shape [n], each Jacobian J will have shape [m * 2, n * 2] with J[:m, :n] = d(Re y)/d(Re x)
J[:m, n:] = d(Im y)/d(Re x)
J[m:, :n] = d(Re y)/d(Im x)
J[m:, n:] = d(Im y)/d(Im x)

 


 Args
  x   a tensor or list of tensors  
  x_shape   the dimensions of x as a tuple or an array of ints. If x is a list, then this is the list of shapes.  
  y   a tensor  
  y_shape   the dimensions of y as a tuple or an array of ints.  
  x_init_value   (optional) a numpy array of the same shape as "x" representing the initial value of x. If x is a list, this should be a list of numpy arrays. If this is none, the function will pick a random tensor as the initial value.  
  delta   (optional) the amount of perturbation.  
  init_targets   list of targets to run to initialize model params.  
  extra_feed_dict   dict that allows fixing specified tensor values during the Jacobian calculation.   
 


 Returns   Two 2-d numpy arrays representing the theoretical and numerical Jacobian for dy/dx. Each has "x_size" rows and "y_size" columns where "x_size" is the number of elements in x and "y_size" is the number of elements in y. If x is a list, returns a list of two numpy arrays.
tf.compat.v1.test.compute_gradient_error Computes the gradient error. (deprecated) 
tf.compat.v1.test.compute_gradient_error(
    x, x_shape, y, y_shape, x_init_value=None, delta=0.001, init_targets=None,
    extra_feed_dict=None
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.test.compute_gradient in 2.0, which has better support for functions. Note that the two versions have different usage, so code change is needed. Computes the maximum error for dy/dx between the computed Jacobian and the numerically estimated Jacobian. This function will modify the tensors passed in as it adds more operations and hence changing the consumers of the operations of the input tensors. This function adds operations to the current session. To compute the error using a particular device, such as a GPU, use the standard methods for setting a device (e.g. using with sess.graph.device() or setting a device function in the session constructor).
 


 Args
  x   a tensor or list of tensors  
  x_shape   the dimensions of x as a tuple or an array of ints. If x is a list, then this is the list of shapes.  
  y   a tensor  
  y_shape   the dimensions of y as a tuple or an array of ints.  
  x_init_value   (optional) a numpy array of the same shape as "x" representing the initial value of x. If x is a list, this should be a list of numpy arrays. If this is none, the function will pick a random tensor as the initial value.  
  delta   (optional) the amount of perturbation.  
  init_targets   list of targets to run to initialize model params.  
  extra_feed_dict   dict that allows fixing specified tensor values during the Jacobian calculation.   
 


 Returns   The maximum error in between the two Jacobians.
tf.compat.v1.test.get_temp_dir Returns a temporary directory for use during tests. 
tf.compat.v1.test.get_temp_dir()
 There is no need to delete the directory after the test.
 


 Returns   The temporary directory.