tf.compat.v1.profiler.OpLogProto A ProtocolMessage

 Attributes
  id_to_string   repeated IdToStringEntry id_to_string
  log_entries   repeated OpLogEntry log_entries    Child Classes class IdToStringEntry


tf.compat.v1.profiler.OpLogProto.IdToStringEntry A ProtocolMessage

 Attributes
  key   int64 key
  value   string value


tf.compat.v1.profiler.profile Profile model.
tf.compat.v1.profiler.profile(
    graph=None, run_meta=None, op_log=None, cmd='scope',
    options=_DEFAULT_PROFILE_OPTIONS
)
 Tutorials and examples can be found in: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/profiler/g3doc/python_api.md

 Args
  graph   tf.Graph. If None and eager execution is not enabled, use default graph.
  run_meta   optional tensorflow.RunMetadata proto. It is necessary to to support run time information profiling, such as time and memory.
  op_log   tensorflow.tfprof.OpLogProto proto. User can assign "types" to graph nodes with op_log. "types" allow user to flexibly group and account profiles using options['accounted_type_regexes'].
  cmd   string. Either 'op', 'scope', 'graph' or 'code'. 'op' view organizes profile using operation type. (e.g. MatMul) 'scope' view organizes profile using graph node name scope. 'graph' view organizes profile using graph node inputs/outputs. 'code' view organizes profile using Python call stack.
  options   A dict of options. See core/profiler/g3doc/options.md.

 Returns   If cmd is 'scope' or 'graph', returns GraphNodeProto proto. If cmd is 'op' or 'code', returns MultiGraphNodeProto proto. Side effect: stdout/file/timeline.json depending on options['output']


tf.compat.v1.profiler.ProfileOptionBuilder Option Builder for Profiling API.
tf.compat.v1.profiler.ProfileOptionBuilder(
    options=None
)
 For tutorial on the options, see https://github.com/tensorflow/tensorflow/tree/master/tensorflow/core/profiler/g3doc/options.md # Users can use pre-built options:
opts = (
    tf.profiler.ProfileOptionBuilder.trainable_variables_parameter())

# Or, build your own options:
opts = (tf.compat.v1.profiler.ProfileOptionBuilder()
    .with_max_depth(10)
    .with_min_micros(1000)
    .select(['accelerator_micros'])
    .with_stdout_output()
    .build()

# Or customize the pre-built options:
opts = (tf.compat.v1.profiler.ProfileOptionBuilder(
    tf.profiler.ProfileOptionBuilder.time_and_memory())
    .with_displaying_options(show_name_regexes=['.*rnn.*'])
    .build())

# Finally, profiling with the options:
_ = tf.compat.v1.profiler.profile(tf.compat.v1.get_default_graph(),
                        run_meta=run_meta,
                        cmd='scope',
                        options=opts)

 Args
  options   Optional initial option dict to start with.    Methods account_displayed_op_only View source
account_displayed_op_only(
    is_true
)
 Whether only account the statistics of displayed profiler nodes.

 Args
  is_true   If true, only account statistics of nodes eventually displayed by the outputs. Otherwise, a node's statistics are accounted by its parents as long as it's types match 'account_type_regexes', even if it is hidden from the output, say, by hide_name_regexes.

 Returns   self
 build View source
build()
 Build a profiling option.

 Returns   A dict of profiling options.
 float_operation View source
@staticmethod
float_operation()
 Options used to profile float operations. Please see https://github.com/tensorflow/tensorflow/tree/master/tensorflow/core/profiler/g3doc/profile_model_architecture.md on the caveats of calculating float operations.

 Returns   A dict of profiling options.
 order_by View source
order_by(
    attribute
)
 Order the displayed profiler nodes based on a attribute. Supported attribute includes micros, bytes, occurrence, params, etc. https://github.com/tensorflow/tensorflow/tree/master/tensorflow/core/profiler/g3doc/options.md

 Args
  attribute   An attribute the profiler node has.

 Returns   self
 select View source
select(
    attributes
)
 Select the attributes to display. See https://github.com/tensorflow/tensorflow/tree/master/tensorflow/core/profiler/g3doc/options.md for supported attributes.

 Args
  attributes   A list of attribute the profiler node has.

 Returns   self
 time_and_memory View source
@staticmethod
time_and_memory(
    min_micros=1, min_bytes=1, min_accelerator_micros=0, min_cpu_micros=0,
    min_peak_bytes=0, min_residual_bytes=0, min_output_bytes=0
)
 Show operation time and memory consumptions.

 Args
  min_micros   Only show profiler nodes with execution time no less than this. It sums accelerator and cpu times.
  min_bytes   Only show profiler nodes requested to allocate no less bytes than this.
  min_accelerator_micros   Only show profiler nodes spend no less than this time on accelerator (e.g. GPU).
  min_cpu_micros   Only show profiler nodes spend no less than this time on cpu.
  min_peak_bytes   Only show profiler nodes using no less than this bytes at peak (high watermark). For profiler nodes consist of multiple graph nodes, it sums the graph nodes' peak_bytes.
  min_residual_bytes   Only show profiler nodes have no less than this bytes not being de-allocated after Compute() ends. For profiler nodes consist of multiple graph nodes, it sums the graph nodes' residual_bytes.
  min_output_bytes   Only show profiler nodes have no less than this bytes output. The output are not necessarily allocated by this profiler nodes.

 Returns   A dict of profiling options.
 trainable_variables_parameter View source
@staticmethod
trainable_variables_parameter()
 Options used to profile trainable variable parameters. Normally used together with 'scope' view.

 Returns   A dict of profiling options.
 with_accounted_types View source
with_accounted_types(
    account_type_regexes
)
 Selectively counting statistics based on node types. Here, 'types' means the profiler nodes' properties. Profiler by default consider device name (e.g. /job:xx/.../device:GPU:0) and operation type (e.g. MatMul) as profiler nodes' properties. User can also associate customized 'types' to profiler nodes through OpLogProto proto. For example, user can select profiler nodes placed on gpu:0 with: account_type_regexes=['.*gpu:0.*'] If none of a node's properties match the specified regexes, the node is not displayed nor accounted.

 Args
  account_type_regexes   A list of regexes specifying the types.

 Returns   self.
 with_empty_output View source
with_empty_output()
 Do not generate side-effect outputs. with_file_output View source
with_file_output(
    outfile
)
 Print the result to a file. with_max_depth View source
with_max_depth(
    max_depth
)
 Set the maximum depth of display. The depth depends on profiling view. For 'scope' view, it's the depth of name scope hierarchy (tree), for 'op' view, it's the number of operation types (list), etc.

 Args
  max_depth   Maximum depth of the data structure to display.

 Returns   self
 with_min_execution_time View source
with_min_execution_time(
    min_micros=0, min_accelerator_micros=0, min_cpu_micros=0
)
 Only show profiler nodes consuming no less than 'min_micros'.

 Args
  min_micros   Only show profiler nodes with execution time no less than this. It sums accelerator and cpu times.
  min_accelerator_micros   Only show profiler nodes spend no less than this time on accelerator (e.g. GPU).
  min_cpu_micros   Only show profiler nodes spend no less than this time on cpu.

 Returns   self
 with_min_float_operations View source
with_min_float_operations(
    min_float_ops
)
 Only show profiler nodes consuming no less than 'min_float_ops'. Please see https://github.com/tensorflow/tensorflow/tree/master/tensorflow/core/profiler/g3doc/profile_model_architecture.md on the caveats of calculating float operations.

 Args
  min_float_ops   Only show profiler nodes with float operations no less than this.

 Returns   self
 with_min_memory View source
with_min_memory(
    min_bytes=0, min_peak_bytes=0, min_residual_bytes=0, min_output_bytes=0
)
 Only show profiler nodes consuming no less than 'min_bytes'.

 Args
  min_bytes   Only show profiler nodes requested to allocate no less bytes than this.
  min_peak_bytes   Only show profiler nodes using no less than this bytes at peak (high watermark). For profiler nodes consist of multiple graph nodes, it sums the graph nodes' peak_bytes.
  min_residual_bytes   Only show profiler nodes have no less than this bytes not being de-allocated after Compute() ends. For profiler nodes consist of multiple graph nodes, it sums the graph nodes' residual_bytes.
  min_output_bytes   Only show profiler nodes have no less than this bytes output. The output are not necessarily allocated by this profiler nodes.

 Returns   self
 with_min_occurrence View source
with_min_occurrence(
    min_occurrence
)
 Only show profiler nodes including no less than 'min_occurrence' graph nodes. A "node" means a profiler output node, which can be a python line (code view), an operation type (op view), or a graph node (graph/scope view). A python line includes all graph nodes created by that line, while an operation type includes all graph nodes of that type.

 Args
  min_occurrence   Only show nodes including no less than this.

 Returns   self
 with_min_parameters View source
with_min_parameters(
    min_params
)
 Only show profiler nodes holding no less than 'min_params' parameters. 'Parameters' normally refers the weights of in TensorFlow variables. It reflects the 'capacity' of models.

 Args
  min_params   Only show profiler nodes holding number parameters no less than this.

 Returns   self
 with_node_names View source
with_node_names(
    start_name_regexes=None, show_name_regexes=None, hide_name_regexes=None,
    trim_name_regexes=None
)
 Regular expressions used to select profiler nodes to display. After 'with_accounted_types' is evaluated, 'with_node_names' are evaluated as follows: For a profile data structure, profiler first finds the profiler nodes matching 'start_name_regexes', and starts displaying profiler nodes from there. Then, if a node matches 'show_name_regexes' and doesn't match 'hide_name_regexes', it's displayed. If a node matches 'trim_name_regexes', profiler stops further searching that branch.

 Args
  start_name_regexes   list of node name regexes to start displaying.
  show_name_regexes   list of node names regexes to display.
  hide_name_regexes   list of node_names regexes that should be hidden.
  trim_name_regexes   list of node name regexes from where to stop.

 Returns   self
 with_pprof_output View source
with_pprof_output(
    pprof_file
)
 Generate a pprof profile gzip file. To use the pprof file: pprof -png --nodecount=100 --sample_index=1

 Args
  pprof_file   filename for output, usually suffixed with .pb.gz.

 Returns   self.
 with_stdout_output View source
with_stdout_output()
 Print the result to stdout. with_step View source
with_step(
    step
)
 Which profile step to use for profiling. The 'step' here refers to the step defined by Profiler.add_step() API.

 Args
  step   When multiple steps of profiles are available, select which step's profile to use. If -1, use average of all available steps.

 Returns   self
 with_timeline_output View source
with_timeline_output(
    timeline_file
)
 Generate a timeline json file.


tf.compat.v1.profiler.Profiler TensorFlow multi-step profiler.
tf.compat.v1.profiler.Profiler(
    graph=None, op_log=None
)
 https://github.com/tensorflow/tensorflow/tree/master/tensorflow/core/profiler/README.md Typical use case:
  # Currently we are only allowed to create 1 profiler per process.
  profiler = Profiler(sess.graph)

  for i in xrange(total_steps):
    if i % 10000 == 0:
      run_meta = tf.compat.v1.RunMetadata()
      _ = sess.run(...,
                   options=tf.compat.v1.RunOptions(
                       trace_level=tf.RunOptions.FULL_TRACE),
                   run_metadata=run_meta)
      profiler.add_step(i, run_meta)

      # Profile the parameters of your model.
      profiler.profile_name_scope(options=(option_builder.ProfileOptionBuilder
          .trainable_variables_parameter()))

      # Or profile the timing of your model operations.
      opts = option_builder.ProfileOptionBuilder.time_and_memory()
      profiler.profile_operations(options=opts)

      # Or you can generate a timeline:
      opts = (option_builder.ProfileOptionBuilder(
              option_builder.ProfileOptionBuilder.time_and_memory())
              .with_step(i)
              .with_timeline_output(filename).build())
      profiler.profile_graph(options=opts)
    else:
      _ = sess.run(...)
  # Auto detect problems and generate advice.
  profiler.advise()

 Args
  graph   tf.Graph. If None and eager execution is not enabled, use default graph.
  op_log   optional. tensorflow::tfprof::OpLogProto proto. Used to define extra op types.    Methods add_step View source
add_step(
    step, run_meta
)
 Add statistics of a step.

 Args
  step   int, An id used to group one or more different run_meta together. When profiling with the profile_xxx APIs, user can use the step id in the options to profile these run_meta together.
  run_meta   RunMetadata proto that contains statistics of a session run.    advise View source
advise(
    options
)
 Automatically detect problems and generate reports.

 Args
  options   A dict of options. See ALL_ADVICE example above.

 Returns   An Advise proto that contains the reports from all checkers.
 profile_graph View source
profile_graph(
    options
)
 Profile the statistics of graph nodes, organized by dataflow graph.

 Args
  options   A dict of options. See core/profiler/g3doc/options.md.

 Returns   a GraphNodeProto that records the results.
 profile_name_scope View source
profile_name_scope(
    options
)
 Profile the statistics of graph nodes, organized by name scope.

 Args
  options   A dict of options. See core/profiler/g3doc/options.md.

 Returns   a GraphNodeProto that records the results.
 profile_operations View source
profile_operations(
    options
)
 Profile the statistics of the Operation types (e.g. MatMul, Conv2D).

 Args
  options   A dict of options. See core/profiler/g3doc/options.md.

 Returns   a MultiGraphNodeProto that records the results.
 profile_python View source
profile_python(
    options
)
 Profile the statistics of the Python codes. By default, it shows the call stack from root. To avoid redundant output, you may use options to filter as below options['show_name_regexes'] = ['.my_code.py.']

 Args
  options   A dict of options. See core/profiler/g3doc/options.md.

 Returns   a MultiGraphNodeProto that records the results.
 serialize_to_string View source
serialize_to_string()
 Serialize the ProfileProto to a binary string. Users can write it to file for offline analysis by tfprof commandline or graphical interface.

 Returns   ProfileProto binary string.


tf.compat.v1.profiler.write_op_log Log provided 'op_log', and add additional model information below.
tf.compat.v1.profiler.write_op_log(
    graph, log_dir, op_log=None, run_meta=None, add_trace=True
)
 The API also assigns ops in tf.compat.v1.trainable_variables() an op type called '_trainable_variables'. The API also logs 'flops' statistics for ops with op.RegisterStatistics() defined. flops calculation depends on Tensor shapes defined in 'graph', which might not be complete. 'run_meta', if provided, completes the shape information with best effort.

 Args
  graph   tf.Graph. If None and eager execution is not enabled, use default graph.
  log_dir   directory to write the log file.
  op_log   (Optional) OpLogProto proto to be written. If not provided, an new one is created.
  run_meta   (Optional) RunMetadata proto that helps flops computation using run time shape information.
  add_trace   Whether to add python code trace information. Used to support "code" view.


Module: tf.compat.v1.python_io Python functions for directly manipulating TFRecord-formatted files. Classes class TFRecordCompressionType: The type of compression for the record. class TFRecordOptions: Options used for manipulating TFRecord files. class TFRecordWriter: A class to write records to a TFRecords file. Functions tf_record_iterator(...): An iterator that read the records from a TFRecords file. (deprecated)


tf.compat.v1.py_func Wraps a python function and uses it as a TensorFlow op.
tf.compat.v1.py_func(
    func, inp, Tout, stateful=True, name=None
)
 Given a python function func, which takes numpy arrays as its arguments and returns numpy arrays as its outputs, wrap this function as an operation in a TensorFlow graph. The following snippet constructs a simple TensorFlow graph that invokes the np.sinh() NumPy function as a operation in the graph: def my_func(x):
  # x will be a numpy array with the contents of the placeholder below
  return np.sinh(x)
input = tf.compat.v1.placeholder(tf.float32)
y = tf.compat.v1.py_func(my_func, [input], tf.float32)

Note: The tf.compat.v1.py_func() operation has the following known limitations:
  The body of the function (i.e. func) will not be serialized in a GraphDef. Therefore, you should not use this function if you need to serialize your model and restore it in a different environment. The operation must run in the same address space as the Python program that calls tf.compat.v1.py_func(). If you are using distributed TensorFlow, you must run a tf.distribute.Server in the same process as the program that calls tf.compat.v1.py_func() and you must pin the created operation to a device in that server (e.g. using with tf.device():).

 Args
  func   A Python function, which accepts ndarray objects as arguments and returns a list of ndarray objects (or a single ndarray). This function must accept as many arguments as there are tensors in inp, and these argument types will match the corresponding tf.Tensor objects in inp. The returns ndarrays must match the number and types defined Tout. Important Note: Input and output numpy ndarrays of func are not guaranteed to be copies. In some cases their underlying memory will be shared with the corresponding TensorFlow tensors. In-place modification or storing func input or return values in python datastructures without explicit (np.)copy can have non-deterministic consequences.
  inp   A list of Tensor objects.
  Tout   A list or tuple of tensorflow data types or a single tensorflow data type if there is only one, indicating what func returns.
  stateful   (Boolean.) If True, the function should be considered stateful. If a function is stateless, when given the same input it will return the same output and have no observable side effects. Optimizations such as common subexpression elimination are only performed on stateless operations.
  name   A name for the operation (optional).

 Returns   A list of Tensor or a single Tensor which func computes.


Module: tf.compat.v1.quantization Public API for tf.quantization namespace. Functions dequantize(...): Dequantize the 'input' tensor into a float or bfloat16 Tensor. fake_quant_with_min_max_args(...): Fake-quantize the 'inputs' tensor, type float to 'outputs' tensor of same type. fake_quant_with_min_max_args_gradient(...): Compute gradients for a FakeQuantWithMinMaxArgs operation. fake_quant_with_min_max_vars(...): Fake-quantize the 'inputs' tensor of type float via global float scalars fake_quant_with_min_max_vars_gradient(...): Compute gradients for a FakeQuantWithMinMaxVars operation. fake_quant_with_min_max_vars_per_channel(...): Fake-quantize the 'inputs' tensor of type float via per-channel floats fake_quant_with_min_max_vars_per_channel_gradient(...): Compute gradients for a FakeQuantWithMinMaxVarsPerChannel operation. quantize(...): Quantize the 'input' tensor of type float to 'output' tensor of type 'T'. quantize_and_dequantize(...): Quantizes then dequantizes a tensor. (deprecated) quantize_and_dequantize_v2(...): Quantizes then dequantizes a tensor. quantized_concat(...): Concatenates quantized tensors along one dimension.


tf.compat.v1.quantize_v2 Please use tf.quantization.quantize instead.
tf.compat.v1.quantize_v2(
    input, min_range, max_range, T, mode='MIN_COMBINED', name=None,
    round_mode='HALF_AWAY_FROM_ZERO', narrow_range=False, axis=None,
    ensure_minimum_range=0.01
)


Module: tf.compat.v1.queue Public API for tf.queue namespace. Classes class FIFOQueue: A queue implementation that dequeues elements in first-in first-out order. class PaddingFIFOQueue: A FIFOQueue that supports batching variable-sized tensors by padding. class PriorityQueue: A queue implementation that dequeues elements in prioritized order. class QueueBase: Base class for queue implementations. class RandomShuffleQueue: A queue implementation that dequeues elements in a random order.


Module: tf.compat.v1.ragged Ragged Tensors. This package defines ops for manipulating ragged tensors (tf.RaggedTensor), which are tensors with non-uniform shapes. In particular, each RaggedTensor has one or more ragged dimensions, which are dimensions whose slices may have different lengths. For example, the inner (column) dimension of rt=[[3, 1, 4, 1], [], [5, 9, 2], [6], []] is ragged, since the column slices (rt[0, :], ..., rt[4, :]) have different lengths. For a more detailed description of ragged tensors, see the tf.RaggedTensor class documentation and the Ragged Tensor Guide. Additional ops that support RaggedTensor
 Arguments that accept RaggedTensors are marked in bold.
tf.batch_gather(params, indices, name=None)
tf.bitwise.bitwise_and(x, y, name=None)
tf.bitwise.bitwise_or(x, y, name=None)
tf.bitwise.bitwise_xor(x, y, name=None)
tf.bitwise.invert(x, name=None)
tf.bitwise.left_shift(x, y, name=None)
tf.bitwise.right_shift(x, y, name=None)
tf.cast(x, dtype, name=None)
tf.clip_by_value(t, clip_value_min, clip_value_max, name=None)
tf.concat(values, axis, name='concat')
tf.debugging.check_numerics(tensor, message, name=None)
tf.dtypes.complex(real, imag, name=None)
tf.dtypes.saturate_cast(value, dtype, name=None)
tf.dynamic_partition(data, partitions, num_partitions, name=None)
tf.expand_dims(input, axis=None, name=None, dim=None)
tf.gather_nd(params, indices, name=None, batch_dims=0)
tf.gather(params, indices, validate_indices=None, name=None, axis=None, batch_dims=0)
tf.identity(input, name=None)
tf.io.decode_base64(input, name=None)
tf.io.decode_compressed(bytes, compression_type='', name=None)
tf.io.encode_base64(input, pad=False, name=None)
tf.math.abs(x, name=None)
tf.math.acos(x, name=None)
tf.math.acosh(x, name=None)
tf.math.add_n(inputs, name=None)
tf.math.add(x, y, name=None)
tf.math.angle(input, name=None)
tf.math.asin(x, name=None)
tf.math.asinh(x, name=None)
tf.math.atan2(y, x, name=None)
tf.math.atan(x, name=None)
tf.math.atanh(x, name=None)
tf.math.ceil(x, name=None)
tf.math.conj(x, name=None)
tf.math.cos(x, name=None)
tf.math.cosh(x, name=None)
tf.math.digamma(x, name=None)
tf.math.divide_no_nan(x, y, name=None)
tf.math.divide(x, y, name=None)
tf.math.equal(x, y, name=None)
tf.math.erf(x, name=None)
tf.math.erfc(x, name=None)
tf.math.erfinv(x, name=None)
tf.math.exp(x, name=None)
tf.math.expm1(x, name=None)
tf.math.floor(x, name=None)
tf.math.floordiv(x, y, name=None)
tf.math.floormod(x, y, name=None)
tf.math.greater_equal(x, y, name=None)
tf.math.greater(x, y, name=None)
tf.math.imag(input, name=None)
tf.math.is_finite(x, name=None)
tf.math.is_inf(x, name=None)
tf.math.is_nan(x, name=None)
tf.math.less_equal(x, y, name=None)
tf.math.less(x, y, name=None)
tf.math.lgamma(x, name=None)
tf.math.log1p(x, name=None)
tf.math.log_sigmoid(x, name=None)
tf.math.log(x, name=None)
tf.math.logical_and(x, y, name=None)
tf.math.logical_not(x, name=None)
tf.math.logical_or(x, y, name=None)
tf.math.logical_xor(x, y, name='LogicalXor')
tf.math.maximum(x, y, name=None)
tf.math.minimum(x, y, name=None)
tf.math.multiply(x, y, name=None)
tf.math.ndtri(x, name=None)
tf.math.negative(x, name=None)
tf.math.not_equal(x, y, name=None)
tf.math.pow(x, y, name=None)
tf.math.real(input, name=None)
tf.math.reciprocal(x, name=None)
tf.math.reduce_all(input_tensor, axis=None, keepdims=False, name=None)
tf.math.reduce_any(input_tensor, axis=None, keepdims=False, name=None)
tf.math.reduce_max(input_tensor, axis=None, keepdims=False, name=None)
tf.math.reduce_mean(input_tensor, axis=None, keepdims=False, name=None)
tf.math.reduce_min(input_tensor, axis=None, keepdims=False, name=None)
tf.math.reduce_prod(input_tensor, axis=None, keepdims=False, name=None)
tf.math.reduce_sum(input_tensor, axis=None, keepdims=False, name=None)
tf.math.rint(x, name=None)
tf.math.round(x, name=None)
tf.math.rsqrt(x, name=None)
tf.math.sign(x, name=None)
tf.math.sin(x, name=None)
tf.math.sinh(x, name=None)
tf.math.sqrt(x, name=None)
tf.math.square(x, name=None)
tf.math.squared_difference(x, y, name=None)
tf.math.subtract(x, y, name=None)
tf.math.tan(x, name=None)
tf.math.truediv(x, y, name=None)
tf.math.unsorted_segment_max(data, segment_ids, num_segments, name=None)
tf.math.unsorted_segment_mean(data, segment_ids, num_segments, name=None)
tf.math.unsorted_segment_min(data, segment_ids, num_segments, name=None)
tf.math.unsorted_segment_prod(data, segment_ids, num_segments, name=None)
tf.math.unsorted_segment_sqrt_n(data, segment_ids, num_segments, name=None)
tf.math.unsorted_segment_sum(data, segment_ids, num_segments, name=None)
tf.nn.dropout(x, keep_prob=None, noise_shape=None, seed=None, name=None, rate=None)
tf.one_hot(indices, depth, on_value=None, off_value=None, axis=None, dtype=None, name=None)
tf.ones_like(tensor, dtype=None, name=None, optimize=True)
tf.print(*inputs, **kwargs)
tf.rank(input, name=None)
tf.realdiv(x, y, name=None)
tf.reverse(tensor, axis, name=None)
tf.size(input, name=None, out_type=tf.int32)
tf.squeeze(input, axis=None, name=None, squeeze_dims=None)
tf.stack(values, axis=0, name='stack')
tf.strings.as_string(input, precision=-1, scientific=False, shortest=False, width=-1, fill='', name=None)
tf.strings.format(template, inputs, placeholder='{}', summarize=3, name=None)
tf.strings.join(inputs, separator='', name=None)
tf.strings.length(input, name=None, unit='BYTE')
tf.strings.reduce_join(inputs, axis=None, keepdims=False, separator='', name=None)
tf.strings.regex_full_match(input, pattern, name=None)
tf.strings.regex_replace(input, pattern, rewrite, replace_global=True, name=None)
tf.strings.strip(input, name=None)
tf.strings.substr(input, pos, len, name=None, unit='BYTE')
tf.strings.to_hash_bucket_fast(input, num_buckets, name=None)
tf.strings.to_hash_bucket_strong(input, num_buckets, key, name=None)
tf.strings.to_hash_bucket(input, num_buckets, name=None)
tf.strings.to_hash_bucket(input, num_buckets, name=None)
tf.strings.to_number(input, out_type=tf.float32, name=None)
tf.strings.unicode_script(input, name=None)
tf.tile(input, multiples, name=None)
tf.truncatediv(x, y, name=None)
tf.truncatemod(x, y, name=None)
tf.where(condition, x=None, y=None, name=None)
tf.where(condition, x=None, y=None, name=None)
tf.zeros_like(tensor, dtype=None, name=None, optimize=True)n  Classes class RaggedTensorValue: Represents the value of a RaggedTensor. Functions boolean_mask(...): Applies a boolean mask to data without flattening the mask dimensions. constant(...): Constructs a constant RaggedTensor from a nested Python list. constant_value(...): Constructs a RaggedTensorValue from a nested Python list. cross(...): Generates feature cross from a list of tensors. cross_hashed(...): Generates hashed feature cross from a list of tensors. map_flat_values(...): Applies op to the values of one or more RaggedTensors. placeholder(...): Creates a placeholder for a tf.RaggedTensor that will always be fed. range(...): Returns a RaggedTensor containing the specified sequences of numbers. row_splits_to_segment_ids(...): Generates the segmentation corresponding to a RaggedTensor row_splits. segment_ids_to_row_splits(...): Generates the RaggedTensor row_splits corresponding to a segmentation. stack(...): Stacks a list of rank-R tensors into one rank-(R+1) RaggedTensor. stack_dynamic_partitions(...): Stacks dynamic partitions of a Tensor or RaggedTensor.


tf.compat.v1.ragged.constant_value Constructs a RaggedTensorValue from a nested Python list.
tf.compat.v1.ragged.constant_value(
    pylist, dtype=None, ragged_rank=None, inner_shape=None,
    row_splits_dtype='int64'
)
 Warning: This function returns a RaggedTensorValue, not a RaggedTensor. If you wish to construct a constant RaggedTensor, use ragged.constant(...) instead. Example:
tf.compat.v1.ragged.constant_value([[1, 2], [3], [4, 5, 6]])
tf.RaggedTensorValue(values=array([1, 2, 3, 4, 5, 6]),
                     row_splits=array([0, 2, 3, 6]))
 All scalar values in pylist must have the same nesting depth K, and the returned RaggedTensorValue will have rank K. If pylist contains no scalar values, then K is one greater than the maximum depth of empty lists in pylist. All scalar values in pylist must be compatible with dtype.

 Args
  pylist   A nested list, tuple or np.ndarray. Any nested element that is not a list or tuple must be a scalar value compatible with dtype.
  dtype   numpy.dtype. The type of elements for the returned RaggedTensor. If not specified, then a default is chosen based on the scalar values in pylist.
  ragged_rank   An integer specifying the ragged rank of the returned RaggedTensorValue. Must be nonnegative and less than K. Defaults to max(0, K - 1) if inner_shape is not specified. Defaults to `max(0, K  1 - len(inner_shape))ifinner_shapeis specified.

 inner_shape	  A tuple of integers specifying the shape for individual inner values in the returnedRaggedTensorValue. Defaults to()ifragged_rankis not specified. Ifragged_rankis specified, then a default is chosen based on the contents ofpylist.

 row_splits_dtype	  data type for the constructedRaggedTensorValue's row_splits. One ofnumpy.int32ornumpy.int64`.

 Returns   A tf.RaggedTensorValue or numpy.array with rank K and the specified ragged_rank, containing the values from pylist.

 Raises
  ValueError   If the scalar values in pylist have inconsistent nesting depth; or if ragged_rank or inner_shape are incompatible with pylist.


tf.compat.v1.ragged.placeholder Creates a placeholder for a tf.RaggedTensor that will always be fed.
tf.compat.v1.ragged.placeholder(
    dtype, ragged_rank, value_shape=None, name=None
)
 Key Point: This ragged tensor will produce an error if evaluated. Its value must be fed using the feed_dict optional argument to Session.run(), Tensor.eval(), or Operation.run(). @compatibility{eager} Placeholders are not compatible with eager execution.

 Args
  dtype   The data type for the RaggedTensor.
  ragged_rank   The ragged rank for the RaggedTensor
  value_shape   The shape for individual flat values in the RaggedTensor.
  name   A name for the operation (optional).

 Returns   A RaggedTensor that may be used as a handle for feeding a value, but not evaluated directly.

 Raises
  RuntimeError   if eager execution is enabled


tf.compat.v1.ragged.RaggedTensorValue Represents the value of a RaggedTensor.
tf.compat.v1.ragged.RaggedTensorValue(
    values, row_splits
)
 Warning: RaggedTensorValue should only be used in graph mode; in eager mode, the tf.RaggedTensor class contains its value directly. See tf.RaggedTensor for a description of ragged tensors.

 Args
  values   A numpy array of any type and shape; or a RaggedTensorValue.
  row_splits   A 1-D int32 or int64 numpy array.

 Attributes
  dtype   The numpy dtype of values in this tensor.
  flat_values   The innermost values array for this ragged tensor value.
  nested_row_splits   The row_splits for all ragged dimensions in this ragged tensor value.
  ragged_rank   The number of ragged dimensions in this ragged tensor value.
  row_splits   The split indices for the ragged tensor value.
  shape   A tuple indicating the shape of this RaggedTensorValue.
  values   The concatenated values for all rows in this tensor.    Methods to_list View source
to_list()
 Returns this ragged tensor value as a nested Python list.


Module: tf.compat.v1.random Public API for tf.random namespace. Modules experimental module: Public API for tf.random.experimental namespace. Classes class Algorithm: An enumeration. class Generator: Random-number generator. Functions all_candidate_sampler(...): Generate the set of all classes. categorical(...): Draws samples from a categorical distribution. create_rng_state(...): Creates a RNG state from an integer or a vector. fixed_unigram_candidate_sampler(...): Samples a set of classes using the provided (fixed) base distribution. gamma(...): Draws shape samples from each of the given Gamma distribution(s). get_global_generator(...): Retrieves the global generator. get_seed(...): Returns the local seeds an operation should use given an op-specific seed. learned_unigram_candidate_sampler(...): Samples a set of classes from a distribution learned during training. log_uniform_candidate_sampler(...): Samples a set of classes using a log-uniform (Zipfian) base distribution. multinomial(...): Draws samples from a multinomial distribution. (deprecated) normal(...): Outputs random values from a normal distribution. poisson(...): Draws shape samples from each of the given Poisson distribution(s). set_global_generator(...): Replaces the global generator with another Generator object. set_random_seed(...): Sets the graph-level random seed for the default graph. shuffle(...): Randomly shuffles a tensor along its first dimension. stateless_binomial(...): Outputs deterministic pseudorandom values from a binomial distribution. stateless_categorical(...): Draws deterministic pseudorandom samples from a categorical distribution. stateless_gamma(...): Outputs deterministic pseudorandom values from a gamma distribution. stateless_multinomial(...): Draws deterministic pseudorandom samples from a multinomial distribution. (deprecated) stateless_normal(...): Outputs deterministic pseudorandom values from a normal distribution. stateless_parameterized_truncated_normal(...): Outputs random values from a truncated normal distribution. stateless_poisson(...): Outputs deterministic pseudorandom values from a Poisson distribution. stateless_truncated_normal(...): Outputs deterministic pseudorandom values, truncated normally distributed. stateless_uniform(...): Outputs deterministic pseudorandom values from a uniform distribution. truncated_normal(...): Outputs random values from a truncated normal distribution. uniform(...): Outputs random values from a uniform distribution. uniform_candidate_sampler(...): Samples a set of classes using a uniform base distribution.


Module: tf.compat.v1.random.experimental Public API for tf.random.experimental namespace. Classes class Algorithm: An enumeration. class Generator: Random-number generator. Functions create_rng_state(...): Creates a RNG state from an integer or a vector. get_global_generator(...): Retrieves the global generator. set_global_generator(...): Replaces the global generator with another Generator object. stateless_fold_in(...): Folds in data to an RNG seed to form a new RNG seed. stateless_split(...): Splits an RNG seed into num new seeds by adding a leading axis.


tf.compat.v1.random.stateless_multinomial Draws deterministic pseudorandom samples from a multinomial distribution. (deprecated)
tf.compat.v1.random.stateless_multinomial(
    logits, num_samples, seed, output_dtype=tf.dtypes.int64, name=None
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.random.stateless_categorical instead. This is a stateless version of tf.random.categorical: if run twice with the same seeds and shapes, it will produce the same pseudorandom numbers. The output is consistent across multiple runs on the same hardware (and between CPU and GPU), but may change between versions of TensorFlow or on non-CPU/GPU hardware. Example: # samples has shape [1, 5], where each value is either 0 or 1 with equal
# probability.
samples = tf.random.stateless_categorical(
    tf.math.log([[0.5, 0.5]]), 5, seed=[7, 17])

 Args
  logits   2-D Tensor with shape [batch_size, num_classes]. Each slice [i, :] represents the unnormalized log-probabilities for all classes.
  num_samples   0-D. Number of independent samples to draw for each row slice.
  seed   A shape [2] Tensor, the seed to the random number generator. Must have dtype int32 or int64. (When using XLA, only int32 is allowed.)
  output_dtype   integer type to use for the output. Defaults to int64.
  name   Optional name for the operation.

 Returns   The drawn samples of shape [batch_size, num_samples].


tf.compat.v1.random_normal_initializer Initializer that generates tensors with a normal distribution.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.initializers.random_normal
tf.compat.v1.random_normal_initializer(
    mean=0.0, stddev=1.0, seed=None, dtype=tf.dtypes.float32
)

 Args
  mean   a python scalar or a scalar tensor. Mean of the random values to generate.
  stddev   a python scalar or a scalar tensor. Standard deviation of the random values to generate.
  seed   A Python integer. Used to create random seeds. See tf.compat.v1.set_random_seed for behavior.
  dtype   Default data type, used if no dtype argument is provided when calling the initializer. Only floating point types are supported.    Methods from_config View source
@classmethod
from_config(
    config
)
 Instantiates an initializer from a configuration dictionary. Example: initializer = RandomUniform(-1, 1)
config = initializer.get_config()
initializer = RandomUniform.from_config(config)

 Args
  config   A Python dictionary. It will typically be the output of get_config.

 Returns   An Initializer instance.
 get_config View source
get_config()
 Returns the configuration of the initializer as a JSON-serializable dict.

 Returns   A JSON-serializable Python dict.
 __call__ View source
__call__(
    shape, dtype=None, partition_info=None
)
 Returns a tensor object initialized as specified by the initializer.

 Args
  shape   Shape of the tensor.
  dtype   Optional dtype of the tensor. If not provided use the initializer dtype.
  partition_info   Optional information about the possible partitioning of a tensor.


tf.compat.v1.random_poisson Draws shape samples from each of the given Poisson distribution(s).  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.random.poisson
tf.compat.v1.random_poisson(
    lam, shape, dtype=tf.dtypes.float32, seed=None, name=None
)
 lam is the rate parameter describing the distribution(s). Example: samples = tf.random.poisson([0.5, 1.5], [10])
# samples has shape [10, 2], where each slice [:, 0] and [:, 1] represents
# the samples drawn from each distribution

samples = tf.random.poisson([12.2, 3.3], [7, 5])
# samples has shape [7, 5, 2], where each slice [:, :, 0] and [:, :, 1]
# represents the 7x5 samples drawn from each of the two distributions

 Args
  lam   A Tensor or Python value or N-D array of type dtype. lam provides the rate parameter(s) describing the poisson distribution(s) to sample.
  shape   A 1-D integer Tensor or Python array. The shape of the output samples to be drawn per "rate"-parameterized distribution.
  dtype   The type of the output: float16, float32, float64, int32 or int64.
  seed   A Python integer. Used to create a random seed for the distributions. See tf.random.set_seed for behavior.
  name   Optional name for the operation.

 Returns
  samples   a Tensor of shape tf.concat([shape, tf.shape(lam)], axis=0) with values of type dtype.


tf.compat.v1.random_uniform_initializer Initializer that generates tensors with a uniform distribution.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.initializers.random_uniform
tf.compat.v1.random_uniform_initializer(
    minval=0, maxval=None, seed=None, dtype=tf.dtypes.float32
)

 Args
  minval   A python scalar or a scalar tensor. Lower bound of the range of random values to generate.
  maxval   A python scalar or a scalar tensor. Upper bound of the range of random values to generate. Defaults to 1 for float types.
  seed   A Python integer. Used to create random seeds. See tf.compat.v1.set_random_seed for behavior.
  dtype   Default data type, used if no dtype argument is provided when calling the initializer.    Methods from_config View source
@classmethod
from_config(
    config
)
 Instantiates an initializer from a configuration dictionary. Example: initializer = RandomUniform(-1, 1)
config = initializer.get_config()
initializer = RandomUniform.from_config(config)

 Args
  config   A Python dictionary. It will typically be the output of get_config.

 Returns   An Initializer instance.
 get_config View source
get_config()
 Returns the configuration of the initializer as a JSON-serializable dict.

 Returns   A JSON-serializable Python dict.
 __call__ View source
__call__(
    shape, dtype=None, partition_info=None
)
 Returns a tensor object initialized as specified by the initializer.

 Args
  shape   Shape of the tensor.
  dtype   Optional dtype of the tensor. If not provided use the initializer dtype.
  partition_info   Optional information about the possible partitioning of a tensor.