diff options
author | Cao Zongyan <zongyan.cao@alibaba-inc.com> | 2018-09-11 19:59:11 +0800 |
---|---|---|
committer | Cao Zongyan <zongyan.cao@alibaba-inc.com> | 2018-09-11 19:59:11 +0800 |
commit | 9b3a93edf5a1f259bfe5230cc3b6c076573d4ec9 (patch) | |
tree | cbb0548282ba1584ed91a1be8f89b03ec882f287 /tensorflow/core/api_def | |
parent | 90cf7fb7786c8a9c135ef73482856b082e80f61a (diff) | |
parent | e18f84a394bcbde62b344a3b32e8d8fd248fea58 (diff) |
Merge remote-tracking branch 'origin'
Diffstat (limited to 'tensorflow/core/api_def')
41 files changed, 428 insertions, 104 deletions
diff --git a/tensorflow/core/api_def/base_api/api_def_ApplyAdam.pbtxt b/tensorflow/core/api_def/base_api/api_def_ApplyAdam.pbtxt index b90f5473c8..6341eeda32 100644 --- a/tensorflow/core/api_def/base_api/api_def_ApplyAdam.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_ApplyAdam.pbtxt @@ -82,7 +82,7 @@ END } summary: "Update \'*var\' according to the Adam algorithm." description: <<END -$$lr_t := \text{learning_rate} * \sqrt{(1 - beta_2^t) / (1 - beta_1^t)}$$ +$$lr_t := \text{learning\_rate} * \sqrt{1 - beta_2^t} / (1 - beta_1^t)$$ $$m_t := beta_1 * m_{t-1} + (1 - beta_1) * g$$ $$v_t := beta_2 * v_{t-1} + (1 - beta_2) * g * g$$ $$variable := variable - lr_t * m_t / (\sqrt{v_t} + \epsilon)$$ diff --git a/tensorflow/core/api_def/base_api/api_def_DivNoNan.pbtxt b/tensorflow/core/api_def/base_api/api_def_DivNoNan.pbtxt new file mode 100644 index 0000000000..5604a1a89e --- /dev/null +++ b/tensorflow/core/api_def/base_api/api_def_DivNoNan.pbtxt @@ -0,0 +1,9 @@ +op { + graph_op_name: "DivNoNan" + summary: "Returns 0 if the denominator is zero." + description: <<END + +*NOTE*: `DivNoNan` supports broadcasting. More about broadcasting +[here](http://docs.scipy.org/doc/numpy/user/basics.broadcasting.html) +END +} diff --git a/tensorflow/core/api_def/base_api/api_def_EnsureShape.pbtxt b/tensorflow/core/api_def/base_api/api_def_EnsureShape.pbtxt new file mode 100644 index 0000000000..1658472209 --- /dev/null +++ b/tensorflow/core/api_def/base_api/api_def_EnsureShape.pbtxt @@ -0,0 +1,26 @@ +op { + graph_op_name: "EnsureShape" + in_arg { + name: "input" + description: <<END +A tensor, whose shape is to be validated. +END + } + out_arg { + name: "output" + description: <<END +A tensor with the same shape and contents as the input tensor or value. +END + } + attr { + name: "shape" + description: <<END +The expected (possibly partially specified) shape of the input tensor. +END + } + summary: "Ensures that the tensor's shape matches the expected shape." + description: <<END +Raises an error if the input tensor's shape does not match the specified shape. +Returns the input tensor otherwise. +END +} diff --git a/tensorflow/core/api_def/base_api/api_def_FeatureStatsDataset.pbtxt b/tensorflow/core/api_def/base_api/api_def_FeatureStatsDataset.pbtxt deleted file mode 100644 index ffd01ba5cc..0000000000 --- a/tensorflow/core/api_def/base_api/api_def_FeatureStatsDataset.pbtxt +++ /dev/null @@ -1,3 +0,0 @@ -op { - graph_op_name: "FeatureStatsDataset" -} diff --git a/tensorflow/core/api_def/base_api/api_def_Fill.pbtxt b/tensorflow/core/api_def/base_api/api_def_Fill.pbtxt index 58262a385c..37d1a9dcbf 100644 --- a/tensorflow/core/api_def/base_api/api_def_Fill.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Fill.pbtxt @@ -27,5 +27,15 @@ For example: fill([2, 3], 9) ==> [[9, 9, 9] [9, 9, 9]] ``` + +`tf.fill` differs from `tf.constant` in a few ways: + +* `tf.fill` only supports scalar contents, whereas `tf.constant` supports + Tensor values. +* `tf.fill` creates an Op in the computation graph that constructs the actual + Tensor value at runtime. This is in contrast to `tf.constant` which embeds + the entire Tensor into the graph with a `Const` node. +* Because `tf.fill` evaluates at graph runtime, it supports dynamic shapes + based on other runtime Tensors, unlike `tf.constant`. END } diff --git a/tensorflow/core/api_def/base_api/api_def_MatrixExponential.pbtxt b/tensorflow/core/api_def/base_api/api_def_MatrixExponential.pbtxt index d7b56aec87..46da1de1c3 100644 --- a/tensorflow/core/api_def/base_api/api_def_MatrixExponential.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_MatrixExponential.pbtxt @@ -1,32 +1,5 @@ op { graph_op_name: "MatrixExponential" - in_arg { - name: "input" - description: <<END -Shape is `[..., M, M]`. -END - } - out_arg { - name: "output" - description: <<END -Shape is `[..., M, M]`. - -@compatibility(scipy) -Equivalent to scipy.linalg.expm -@end_compatibility -END - } - summary: "Computes the matrix exponential of one or more square matrices:" - description: <<END -\\(exp(A) = \sum_{n=0}^\infty A^n/n!\\) - -The exponential is computed using a combination of the scaling and squaring -method and the Pade approximation. Details can be founds in: -Nicholas J. Higham, "The scaling and squaring method for the matrix exponential -revisited," SIAM J. Matrix Anal. Applic., 26:1179-1193, 2005. - -The input is a tensor of shape `[..., M, M]` whose inner-most 2 dimensions -form square matrices. The output is a tensor of the same shape as the input -containing the exponential for all input submatrices `[..., :, :]`. -END + visibility: SKIP + summary: "Deprecated, use python implementation tf.linalg.matrix_exponential." } diff --git a/tensorflow/core/api_def/base_api/api_def_ParallelInterleaveDatasetV2.pbtxt b/tensorflow/core/api_def/base_api/api_def_ParallelInterleaveDatasetV2.pbtxt new file mode 100644 index 0000000000..27bc4013c3 --- /dev/null +++ b/tensorflow/core/api_def/base_api/api_def_ParallelInterleaveDatasetV2.pbtxt @@ -0,0 +1,13 @@ +op { + graph_op_name: "ParallelInterleaveDatasetV2" + visibility: HIDDEN + attr { + name: "f" + description: <<END +A function mapping elements of `input_dataset`, concatenated with +`other_arguments`, to a Dataset variant that contains elements matching +`output_types` and `output_shapes`. +END + } + summary: "Creates a dataset that applies `f` to the outputs of `input_dataset`." +} diff --git a/tensorflow/core/api_def/base_api/api_def_ParseExampleDataset.pbtxt b/tensorflow/core/api_def/base_api/api_def_ParseExampleDataset.pbtxt new file mode 100644 index 0000000000..3de2f18fc2 --- /dev/null +++ b/tensorflow/core/api_def/base_api/api_def_ParseExampleDataset.pbtxt @@ -0,0 +1,69 @@ +op { + graph_op_name: "ParseExampleDataset" + in_arg { + name: "dense_defaults" + description: <<END +A dict mapping string keys to `Tensor`s. +The keys of the dict must match the dense_keys of the feature. +END + } + attr { + name: "sparse_keys" + description: <<END +A list of string keys in the examples features. +The results for these keys will be returned as `SparseTensor` objects. +END + } + attr { + name: "dense_keys" + description: <<END +A list of Ndense string Tensors (scalars). +The keys expected in the Examples features associated with dense values. +END + } + attr { + name: "sparse_types" + description: <<END +A list of `DTypes` of the same length as `sparse_keys`. +Only `tf.float32` (`FloatList`), `tf.int64` (`Int64List`), +and `tf.string` (`BytesList`) are supported. +END + } + attr { + name: "Tdense" + description: <<END +A list of DTypes of the same length as `dense_keys`. +Only `tf.float32` (`FloatList`), `tf.int64` (`Int64List`), +and `tf.string` (`BytesList`) are supported. + +END + } + attr { + name: "dense_shapes" + description: <<END +List of tuples with the same length as `dense_keys`. +The shape of the data for each dense feature referenced by `dense_keys`. +Required for any input tensors identified by `dense_keys`. Must be +either fully defined, or may contain an unknown first dimension. +An unknown first dimension means the feature is treated as having +a variable number of blocks, and the output shape along this dimension +is considered unknown at graph build time. Padding is applied for +minibatch elements smaller than the maximum number of blocks for the +given feature along this dimension. +END + } + attr { + name: "output_types" + description: <<END +The type list for the return values. +END + } + attr { + name: "output_shapes" + description: <<END +The list of shapes being produced. +END + } + summary: "Transforms `input_dataset` containing `Example` protos as vectors of DT_STRING into a dataset of `Tensor` or `SparseTensor` objects representing the parsed features." +} + diff --git a/tensorflow/core/api_def/base_api/api_def_ParseSequenceExample.pbtxt b/tensorflow/core/api_def/base_api/api_def_ParseSequenceExample.pbtxt new file mode 100644 index 0000000000..b1cb9a696d --- /dev/null +++ b/tensorflow/core/api_def/base_api/api_def_ParseSequenceExample.pbtxt @@ -0,0 +1,112 @@ +op { + graph_op_name: "ParseSequenceExample" + in_arg { + name: "serialized" + description: <<END +A vector containing binary serialized SequenceExample protos. +END + } + in_arg { + name: "debug_name" + description: <<END +A vector containing the names of the serialized protos. +May contain, for example, table key (descriptive) name for the +corresponding serialized proto. This is purely useful for debugging +purposes, and the presence of values here has no effect on the output. +May also be an empty vector if no name is available. +END + } + in_arg { + name: "context_dense_defaults" + description: <<END +A list of Ncontext_dense Tensors (some may be empty). +context_dense_defaults[j] provides default values +when the SequenceExample's context map lacks context_dense_key[j]. +If an empty Tensor is provided for context_dense_defaults[j], +then the Feature context_dense_keys[j] is required. +The input type is inferred from context_dense_defaults[j], even when it's +empty. If context_dense_defaults[j] is not empty, its shape must match +context_dense_shapes[j]. +END + } + attr { + name: "feature_list_dense_missing_assumed_empty" + description: <<END +A vector listing the +FeatureList keys which may be missing from the SequenceExamples. If the +associated FeatureList is missing, it is treated as empty. By default, +any FeatureList not listed in this vector must exist in the SequenceExamples. +END + } + attr { + name: "context_sparse_keys" + description: <<END +A list of Ncontext_sparse string Tensors (scalars). +The keys expected in the Examples' features associated with context_sparse +values. +END + } + attr { + name: "context_dense_keys" + description: <<END +A list of Ncontext_dense string Tensors (scalars). +The keys expected in the SequenceExamples' context features associated with +dense values. +END + } + attr { + name: "feature_list_sparse_keys" + description: <<END +A list of Nfeature_list_sparse string Tensors +(scalars). The keys expected in the FeatureLists associated with sparse +values. +END + } + attr { + name: "feature_list_dense_keys" + description: <<END +A list of Nfeature_list_dense string Tensors (scalars). +The keys expected in the SequenceExamples' feature_lists associated +with lists of dense values. +END + } + attr { + name: "context_sparse_types" + description: <<END +A list of Ncontext_sparse types; the data types of data in +each context Feature given in context_sparse_keys. +Currently the ParseSingleSequenceExample supports DT_FLOAT (FloatList), +DT_INT64 (Int64List), and DT_STRING (BytesList). +END + } + attr { + name: "context_dense_shapes" + description: <<END +A list of Ncontext_dense shapes; the shapes of data in +each context Feature given in context_dense_keys. +The number of elements in the Feature corresponding to context_dense_key[j] +must always equal context_dense_shapes[j].NumEntries(). +The shape of context_dense_values[j] will match context_dense_shapes[j]. +END + } + attr { + name: "feature_list_sparse_types" + description: <<END +A list of Nfeature_list_sparse types; the data types +of data in each FeatureList given in feature_list_sparse_keys. +Currently the ParseSingleSequenceExample supports DT_FLOAT (FloatList), +DT_INT64 (Int64List), and DT_STRING (BytesList). +END + } + attr { + name: "feature_list_dense_shapes" + description: <<END +A list of Nfeature_list_dense shapes; the shapes of +data in each FeatureList given in feature_list_dense_keys. +The shape of each Feature in the FeatureList corresponding to +feature_list_dense_key[j] must always equal +feature_list_dense_shapes[j].NumEntries(). +END + } + summary: "Transforms a vector of brain.SequenceExample protos (as strings) into typed tensors." +} diff --git a/tensorflow/core/api_def/base_api/api_def_RegexFullMatch.pbtxt b/tensorflow/core/api_def/base_api/api_def_RegexFullMatch.pbtxt index 8cef243aee..30fd97a0d7 100644 --- a/tensorflow/core/api_def/base_api/api_def_RegexFullMatch.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_RegexFullMatch.pbtxt @@ -9,7 +9,7 @@ END in_arg { name: "pattern" description: <<END -A 1-D string tensor of the regular expression to match the input. +A scalar string tensor containing the regular expression to match the input. END } out_arg { diff --git a/tensorflow/core/api_def/base_api/api_def_ResourceApplyAdam.pbtxt b/tensorflow/core/api_def/base_api/api_def_ResourceApplyAdam.pbtxt index ad0aeac004..2dcd136ae3 100644 --- a/tensorflow/core/api_def/base_api/api_def_ResourceApplyAdam.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_ResourceApplyAdam.pbtxt @@ -76,7 +76,7 @@ END } summary: "Update \'*var\' according to the Adam algorithm." description: <<END -$$lr_t := \text{learning_rate} * \sqrt{(1 - beta_2^t) / (1 - beta_1^t)}$$ +$$lr_t := \text{learning\_rate} * \sqrt{1 - beta_2^t} / (1 - beta_1^t)$$ $$m_t := beta_1 * m_{t-1} + (1 - beta_1) * g$$ $$v_t := beta_2 * v_{t-1} + (1 - beta_2) * g * g$$ $$variable := variable - lr_t * m_t / (\sqrt{v_t} + \epsilon)$$ diff --git a/tensorflow/core/api_def/base_api/api_def_ScatterNdUpdate.pbtxt b/tensorflow/core/api_def/base_api/api_def_ScatterNdUpdate.pbtxt index 1a75e67c0c..e400c7402b 100644 --- a/tensorflow/core/api_def/base_api/api_def_ScatterNdUpdate.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_ScatterNdUpdate.pbtxt @@ -70,5 +70,7 @@ The resulting update to ref would look like this: See `tf.scatter_nd` for more details about how to make updates to slices. + +See also `tf.scatter_update` and `tf.batch_scatter_update`. END } diff --git a/tensorflow/core/api_def/base_api/api_def_ScatterUpdate.pbtxt b/tensorflow/core/api_def/base_api/api_def_ScatterUpdate.pbtxt index 4804908afc..4037dee432 100644 --- a/tensorflow/core/api_def/base_api/api_def_ScatterUpdate.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_ScatterUpdate.pbtxt @@ -59,5 +59,7 @@ Requires `updates.shape = indices.shape + ref.shape[1:]` or `updates.shape = []` <div style="width:70%; margin:auto; margin-bottom:10px; margin-top:20px;"> <img style="width:100%" src="https://www.tensorflow.org/images/ScatterUpdate.png" alt> </div> + +See also `tf.batch_scatter_update` and `tf.scatter_nd_update`. END } diff --git a/tensorflow/core/api_def/base_api/api_def_SegmentMax.pbtxt b/tensorflow/core/api_def/base_api/api_def_SegmentMax.pbtxt index 5e2912fcdd..d33a36ce06 100644 --- a/tensorflow/core/api_def/base_api/api_def_SegmentMax.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_SegmentMax.pbtxt @@ -3,7 +3,7 @@ op { in_arg { name: "segment_ids" description: <<END -A 1-D tensor whose rank is equal to the rank of `data`'s +A 1-D tensor whose size is equal to the size of `data`'s first dimension. Values should be sorted and can be repeated. END } @@ -16,8 +16,9 @@ END } summary: "Computes the maximum along segments of a tensor." description: <<END -Read @{$math_ops#Segmentation$the section on segmentation} for an explanation of -segments. +Read +[the section on segmentation](https://tensorflow.org/api_guides/python/math_ops#Segmentation) +for an explanation of segments. Computes a tensor such that \\(output_i = \max_j(data_j)\\) where `max` is over `j` such diff --git a/tensorflow/core/api_def/base_api/api_def_SegmentMean.pbtxt b/tensorflow/core/api_def/base_api/api_def_SegmentMean.pbtxt index a7d85b3f4e..afdc39da96 100644 --- a/tensorflow/core/api_def/base_api/api_def_SegmentMean.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_SegmentMean.pbtxt @@ -3,7 +3,7 @@ op { in_arg { name: "segment_ids" description: <<END -A 1-D tensor whose rank is equal to the rank of `data`'s +A 1-D tensor whose size is equal to the size of `data`'s first dimension. Values should be sorted and can be repeated. END } @@ -16,8 +16,9 @@ END } summary: "Computes the mean along segments of a tensor." description: <<END -Read @{$math_ops#Segmentation$the section on segmentation} for an explanation of -segments. +Read +[the section on segmentation](https://tensorflow.org/api_guides/python/math_ops#Segmentation) +for an explanation of segments. Computes a tensor such that \\(output_i = \frac{\sum_j data_j}{N}\\) where `mean` is diff --git a/tensorflow/core/api_def/base_api/api_def_SegmentMin.pbtxt b/tensorflow/core/api_def/base_api/api_def_SegmentMin.pbtxt index 74fc598218..026b5b3991 100644 --- a/tensorflow/core/api_def/base_api/api_def_SegmentMin.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_SegmentMin.pbtxt @@ -3,7 +3,7 @@ op { in_arg { name: "segment_ids" description: <<END -A 1-D tensor whose rank is equal to the rank of `data`'s +A 1-D tensor whose size is equal to the size of `data`'s first dimension. Values should be sorted and can be repeated. END } @@ -16,8 +16,9 @@ END } summary: "Computes the minimum along segments of a tensor." description: <<END -Read @{$math_ops#Segmentation$the section on segmentation} for an explanation of -segments. +Read +[the section on segmentation](https://tensorflow.org/api_guides/python/math_ops#Segmentation) +for an explanation of segments. Computes a tensor such that \\(output_i = \min_j(data_j)\\) where `min` is over `j` such diff --git a/tensorflow/core/api_def/base_api/api_def_SegmentProd.pbtxt b/tensorflow/core/api_def/base_api/api_def_SegmentProd.pbtxt index 4c4363e524..a168eed87f 100644 --- a/tensorflow/core/api_def/base_api/api_def_SegmentProd.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_SegmentProd.pbtxt @@ -3,7 +3,7 @@ op { in_arg { name: "segment_ids" description: <<END -A 1-D tensor whose rank is equal to the rank of `data`'s +A 1-D tensor whose size is equal to the size of `data`'s first dimension. Values should be sorted and can be repeated. END } @@ -16,8 +16,9 @@ END } summary: "Computes the product along segments of a tensor." description: <<END -Read @{$math_ops#Segmentation$the section on segmentation} for an explanation of -segments. +Read +[the section on segmentation](https://tensorflow.org/api_guides/python/math_ops#Segmentation) +for an explanation of segments. Computes a tensor such that \\(output_i = \prod_j data_j\\) where the product is over `j` such diff --git a/tensorflow/core/api_def/base_api/api_def_SegmentSum.pbtxt b/tensorflow/core/api_def/base_api/api_def_SegmentSum.pbtxt index 583ab3904f..876b860824 100644 --- a/tensorflow/core/api_def/base_api/api_def_SegmentSum.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_SegmentSum.pbtxt @@ -3,7 +3,7 @@ op { in_arg { name: "segment_ids" description: <<END -A 1-D tensor whose rank is equal to the rank of `data`'s +A 1-D tensor whose size is equal to the size of `data`'s first dimension. Values should be sorted and can be repeated. END } @@ -16,8 +16,9 @@ END } summary: "Computes the sum along segments of a tensor." description: <<END -Read @{$math_ops#Segmentation$the section on segmentation} for an explanation of -segments. +Read +[the section on segmentation](https://tensorflow.org/api_guides/python/math_ops#Segmentation) +for an explanation of segments. Computes a tensor such that \\(output_i = \sum_j data_j\\) where sum is over `j` such diff --git a/tensorflow/core/api_def/base_api/api_def_SparseSegmentMean.pbtxt b/tensorflow/core/api_def/base_api/api_def_SparseSegmentMean.pbtxt index 866e04e97b..138a6366c8 100644 --- a/tensorflow/core/api_def/base_api/api_def_SparseSegmentMean.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_SparseSegmentMean.pbtxt @@ -21,8 +21,9 @@ END } summary: "Computes the mean along sparse segments of a tensor." description: <<END -Read @{$math_ops#Segmentation$the section on segmentation} for an explanation of -segments. +Read +[the section on segmentation](https://tensorflow.org/api_guides/python/math_ops#Segmentation) +for an explanation of segments. Like `SegmentMean`, but `segment_ids` can have rank less than `data`'s first dimension, selecting a subset of dimension 0, specified by `indices`. diff --git a/tensorflow/core/api_def/base_api/api_def_SparseSegmentMeanWithNumSegments.pbtxt b/tensorflow/core/api_def/base_api/api_def_SparseSegmentMeanWithNumSegments.pbtxt index af4bc75fa0..b8073d88ac 100644 --- a/tensorflow/core/api_def/base_api/api_def_SparseSegmentMeanWithNumSegments.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_SparseSegmentMeanWithNumSegments.pbtxt @@ -30,7 +30,8 @@ END Like `SparseSegmentMean`, but allows missing ids in `segment_ids`. If an id is misisng, the `output` tensor at that position will be zeroed. -Read @{$math_ops#Segmentation$the section on segmentation} for an explanation of -segments. +Read +[the section on segmentation](https://tensorflow.org/api_guides/python/math_ops#Segmentation) +for an explanation of segments. END } diff --git a/tensorflow/core/api_def/base_api/api_def_SparseSegmentSqrtN.pbtxt b/tensorflow/core/api_def/base_api/api_def_SparseSegmentSqrtN.pbtxt index 194bcea726..945bbdcf62 100644 --- a/tensorflow/core/api_def/base_api/api_def_SparseSegmentSqrtN.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_SparseSegmentSqrtN.pbtxt @@ -23,7 +23,8 @@ END description: <<END N is the size of the segment being reduced. -Read @{$math_ops#Segmentation$the section on segmentation} for an explanation of -segments. +Read +[the section on segmentation](https://tensorflow.org/api_guides/python/math_ops#Segmentation) +for an explanation of segments. END } diff --git a/tensorflow/core/api_def/base_api/api_def_SparseSegmentSqrtNWithNumSegments.pbtxt b/tensorflow/core/api_def/base_api/api_def_SparseSegmentSqrtNWithNumSegments.pbtxt index 8b502928a5..ff328c8a61 100644 --- a/tensorflow/core/api_def/base_api/api_def_SparseSegmentSqrtNWithNumSegments.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_SparseSegmentSqrtNWithNumSegments.pbtxt @@ -32,7 +32,8 @@ N is the size of the segment being reduced. Like `SparseSegmentSqrtN`, but allows missing ids in `segment_ids`. If an id is misisng, the `output` tensor at that position will be zeroed. -Read @{$math_ops#Segmentation$the section on segmentation} for an explanation of -segments. +Read +[the section on segmentation](https://tensorflow.org/api_guides/python/math_ops#Segmentation) +for an explanation of segments. END } diff --git a/tensorflow/core/api_def/base_api/api_def_SparseSegmentSum.pbtxt b/tensorflow/core/api_def/base_api/api_def_SparseSegmentSum.pbtxt index dfd50bf273..a68e14607f 100644 --- a/tensorflow/core/api_def/base_api/api_def_SparseSegmentSum.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_SparseSegmentSum.pbtxt @@ -21,8 +21,9 @@ END } summary: "Computes the sum along sparse segments of a tensor." description: <<END -Read @{$math_ops#Segmentation$the section on segmentation} for an explanation of -segments. +Read +[the section on segmentation](https://tensorflow.org/api_guides/python/math_ops#Segmentation) +for an explanation of segments. Like `SegmentSum`, but `segment_ids` can have rank less than `data`'s first dimension, selecting a subset of dimension 0, specified by `indices`. diff --git a/tensorflow/core/api_def/base_api/api_def_SparseSegmentSumWithNumSegments.pbtxt b/tensorflow/core/api_def/base_api/api_def_SparseSegmentSumWithNumSegments.pbtxt index 3bc16577ff..aa5c1fc8d0 100644 --- a/tensorflow/core/api_def/base_api/api_def_SparseSegmentSumWithNumSegments.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_SparseSegmentSumWithNumSegments.pbtxt @@ -30,8 +30,9 @@ END Like `SparseSegmentSum`, but allows missing ids in `segment_ids`. If an id is misisng, the `output` tensor at that position will be zeroed. -Read @{$math_ops#Segmentation$the section on segmentation} for an explanation of -segments. +Read +[the section on segmentation](https://tensorflow.org/api_guides/python/math_ops#Segmentation) +for an explanation of segments. For example: diff --git a/tensorflow/core/api_def/base_api/api_def_StaticRegexFullMatch.pbtxt b/tensorflow/core/api_def/base_api/api_def_StaticRegexFullMatch.pbtxt new file mode 100644 index 0000000000..6d9d9908ca --- /dev/null +++ b/tensorflow/core/api_def/base_api/api_def_StaticRegexFullMatch.pbtxt @@ -0,0 +1,29 @@ +op { + graph_op_name: "StaticRegexFullMatch" + in_arg { + name: "input" + description: <<END +A string tensor of the text to be processed. +END + } + out_arg { + name: "output" + description: <<END +A bool tensor with the same shape as `input`. +END + } + attr { + name: "pattern" + description: "The regular expression to match the input." + } + summary: "Check if the input matches the regex pattern." + description: <<END +The input is a string tensor of any shape. The pattern is the +regular expression to be matched with every element of the input tensor. +The boolean values (True or False) of the output tensor indicate +if the input matches the regex pattern provided. + +The pattern follows the re2 syntax (https://github.com/google/re2/wiki/Syntax) +END + visibility: HIDDEN +} diff --git a/tensorflow/core/api_def/base_api/api_def_StaticRegexReplace.pbtxt b/tensorflow/core/api_def/base_api/api_def_StaticRegexReplace.pbtxt new file mode 100644 index 0000000000..e382bcec81 --- /dev/null +++ b/tensorflow/core/api_def/base_api/api_def_StaticRegexReplace.pbtxt @@ -0,0 +1,26 @@ +op { + graph_op_name: "StaticRegexReplace" + in_arg { + name: "input" + description: "The text to be processed." + } + out_arg { + name: "output" + description: "The text after applying pattern and rewrite." + } + attr { + name: "pattern" + description: "The regular expression to match the input." + } + attr { + name: "rewrite" + description: "The rewrite to be applied to the matched expresion." + } + attr { + name: "replace_global" + description: "If True, the replacement is global, otherwise the replacement\nis done only on the first match." + } + summary: "Replaces the match of pattern in input with rewrite." + description: "It follows the re2 syntax (https://github.com/google/re2/wiki/Syntax)" + visibility: HIDDEN +} diff --git a/tensorflow/core/api_def/base_api/api_def_StridedSlice.pbtxt b/tensorflow/core/api_def/base_api/api_def_StridedSlice.pbtxt index 8d6fc04847..9a89a4e8e7 100644 --- a/tensorflow/core/api_def/base_api/api_def_StridedSlice.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_StridedSlice.pbtxt @@ -32,7 +32,7 @@ END description: <<END a bitmask where a bit i being 1 means to ignore the begin value and instead use the largest interval possible. At runtime -begin[i] will be replaced with `[0, n-1) if `stride[i] > 0` or +begin[i] will be replaced with `[0, n-1)` if `stride[i] > 0` or `[-1, n-1]` if `stride[i] < 0` END } diff --git a/tensorflow/core/api_def/base_api/api_def_TensorListGather.pbtxt b/tensorflow/core/api_def/base_api/api_def_TensorListGather.pbtxt new file mode 100644 index 0000000000..3022fccb1e --- /dev/null +++ b/tensorflow/core/api_def/base_api/api_def_TensorListGather.pbtxt @@ -0,0 +1,12 @@ +op { + graph_op_name: "TensorListGather" + summary: "Creates a Tensor by indexing into the TensorList." + description: <<END +Each row in the produced Tensor corresponds to the element in the TensorList +specified by the given index (see `tf.gather`). + +input_handle: The input tensor list. +indices: The indices used to index into the list. +values: The tensor. +END +} diff --git a/tensorflow/core/api_def/base_api/api_def_TensorListScatter.pbtxt b/tensorflow/core/api_def/base_api/api_def_TensorListScatter.pbtxt new file mode 100644 index 0000000000..35194b353e --- /dev/null +++ b/tensorflow/core/api_def/base_api/api_def_TensorListScatter.pbtxt @@ -0,0 +1,14 @@ +op { + graph_op_name: "TensorListScatter" + summary: "Creates a TensorList by indexing into a Tensor." + description: <<END +Each member of the TensorList corresponds to one row of the input tensor, +specified by the given index (see `tf.gather`). + +tensor: The input tensor. +indices: The indices used to index into the list. +element_shape: The shape of the elements in the list (can be less specified than + the shape of the tensor). +output_handle: The TensorList. +END +} diff --git a/tensorflow/core/api_def/base_api/api_def_UnsafeDiv.pbtxt b/tensorflow/core/api_def/base_api/api_def_UnsafeDiv.pbtxt deleted file mode 100644 index 82c913d15e..0000000000 --- a/tensorflow/core/api_def/base_api/api_def_UnsafeDiv.pbtxt +++ /dev/null @@ -1,5 +0,0 @@ -op { - graph_op_name: "UnsafeDiv" - summary: "Returns 0 if the denominator is zero." - description: "" -} diff --git a/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentMax.pbtxt b/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentMax.pbtxt index 4ca6780c95..7a60e4387a 100644 --- a/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentMax.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentMax.pbtxt @@ -3,33 +3,36 @@ op { in_arg { name: "segment_ids" description: <<END -A 1-D tensor whose rank is equal to the rank of `data`'s -first dimension. -END +A tensor whose shape is a prefix of `data.shape`.END } out_arg { name: "output" description: <<END -Has same shape as data, except for dimension 0 which -has size `num_segments`. +Has same shape as data, except for the first `segment_ids.rank` +dimensions, which are replaced with a single dimension which has size +`num_segments`. END } summary: "Computes the maximum along segments of a tensor." description: <<END -Read @{$math_ops#Segmentation$the section on segmentation} for an explanation of -segments. +Read +[the section on segmentation](https://tensorflow.org/api_guides/python/math_ops#Segmentation) +for an explanation of segments. This operator is similar to the unsorted segment sum operator found [(here)](../../../api_docs/python/math_ops.md#UnsortedSegmentSum). Instead of computing the sum over segments, it computes the maximum such that: -\\(output_i = \max_j data_j\\) where max is over `j` such -that `segment_ids[j] == i`. +\\(output_i = \max_{j...} data[j...]\\) where max is over tuples `j...` such +that `segment_ids[j...] == i`. If the maximum is empty for a given segment ID `i`, it outputs the smallest possible value for the specific numeric type, `output[i] = numeric_limits<T>::lowest()`. +If the given segment ID `i` is negative, then the corresponding value is +dropped, and will not be included in the result. + <div style="width:70%; margin:auto; margin-bottom:10px; margin-top:20px;"> <img style="width:100%" src="https://www.tensorflow.org/images/UnsortedSegmentMax.png" alt> </div> diff --git a/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentMin.pbtxt b/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentMin.pbtxt index 55ea69b5dd..7e139ddf4d 100644 --- a/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentMin.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentMin.pbtxt @@ -3,31 +3,35 @@ op { in_arg { name: "segment_ids" description: <<END -A 1-D tensor whose rank is equal to the rank of `data`'s -first dimension. +A tensor whose shape is a prefix of `data.shape`. END } out_arg { name: "output" description: <<END -Has same shape as data, except for dimension 0 which -has size `num_segments`. +Has same shape as data, except for the first `segment_ids.rank` +dimensions, which are replaced with a single dimension which has size +`num_segments`. END } summary: "Computes the minimum along segments of a tensor." description: <<END -Read @{$math_ops#segmentation$the section on segmentation} for an explanation of -segments. +Read +[the section on segmentation](https://tensorflow.org/api_guides/python/math_ops#segmentation) +for an explanation of segments. This operator is similar to the unsorted segment sum operator found [(here)](../../../api_docs/python/math_ops.md#UnsortedSegmentSum). Instead of computing the sum over segments, it computes the minimum such that: -\\(output_i = \min_j data_j\\) where min is over `j` such -that `segment_ids[j] == i`. +\\(output_i = \min_{j...} data_[j...]\\) where min is over tuples `j...` such +that `segment_ids[j...] == i`. If the minimum is empty for a given segment ID `i`, it outputs the largest possible value for the specific numeric type, `output[i] = numeric_limits<T>::max()`. + +If the given segment ID `i` is negative, then the corresponding value is +dropped, and will not be included in the result. END } diff --git a/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentProd.pbtxt b/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentProd.pbtxt index 577ff53d60..9c8ea3b620 100644 --- a/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentProd.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentProd.pbtxt @@ -3,30 +3,34 @@ op { in_arg { name: "segment_ids" description: <<END -A 1-D tensor whose rank is equal to the rank of `data`'s -first dimension. +A tensor whose shape is a prefix of `data.shape`. END } out_arg { name: "output" description: <<END -Has same shape as data, except for dimension 0 which -has size `num_segments`. +Has same shape as data, except for the first `segment_ids.rank` +dimensions, which are replaced with a single dimension which has size +`num_segments`. END } summary: "Computes the product along segments of a tensor." description: <<END -Read @{$math_ops#segmentation$the section on segmentation} for an explanation of -segments. +Read +[the section on segmentation](https://tensorflow.org/api_guides/python/math_ops#segmentation) +for an explanation of segments. This operator is similar to the unsorted segment sum operator found [(here)](../../../api_docs/python/math_ops.md#UnsortedSegmentSum). Instead of computing the sum over segments, it computes the product of all entries belonging to a segment such that: -\\(output_i = \prod_j data_j\\) where the product is over `j` such -that `segment_ids[j] == i`. +\\(output_i = \prod_{j...} data[j...]\\) where the product is over tuples +`j...` such that `segment_ids[j...] == i`. If there is no entry for a given segment ID `i`, it outputs 1. + +If the given segment ID `i` is negative, then the corresponding value is +dropped, and will not be included in the result. END } diff --git a/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentSum.pbtxt b/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentSum.pbtxt index 9aeabd030d..7e5d9265c2 100644 --- a/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentSum.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_UnsortedSegmentSum.pbtxt @@ -16,11 +16,12 @@ END } summary: "Computes the sum along segments of a tensor." description: <<END -Read @{$math_ops#Segmentation$the section on segmentation} for an explanation of -segments. +Read +[the section on segmentation](https://tensorflow.org/api_guides/python/math_ops#Segmentation) +for an explanation of segments. Computes a tensor such that -\\(output[i] = sum_{j...} data[j...]\\) where the sum is over tuples `j...` such +\\(output[i] = \sum_{j...} data[j...]\\) where the sum is over tuples `j...` such that `segment_ids[j...] == i`. Unlike `SegmentSum`, `segment_ids` need not be sorted and need not cover all values in the full range of valid values. diff --git a/tensorflow/core/api_def/python_api/api_def_DivNoNan.pbtxt b/tensorflow/core/api_def/python_api/api_def_DivNoNan.pbtxt new file mode 100644 index 0000000000..1bf3fba3c6 --- /dev/null +++ b/tensorflow/core/api_def/python_api/api_def_DivNoNan.pbtxt @@ -0,0 +1,4 @@ +op { + graph_op_name: "DivNoNan" + visibility: HIDDEN +} diff --git a/tensorflow/core/api_def/python_api/api_def_EnsureShape.pbtxt b/tensorflow/core/api_def/python_api/api_def_EnsureShape.pbtxt new file mode 100644 index 0000000000..4414d973ac --- /dev/null +++ b/tensorflow/core/api_def/python_api/api_def_EnsureShape.pbtxt @@ -0,0 +1,4 @@ +op { + graph_op_name: "EnsureShape" + visibility: HIDDEN +} diff --git a/tensorflow/core/api_def/python_api/api_def_FeatureStatsDataset.pbtxt b/tensorflow/core/api_def/python_api/api_def_FeatureStatsDataset.pbtxt deleted file mode 100644 index 7f721f4fb7..0000000000 --- a/tensorflow/core/api_def/python_api/api_def_FeatureStatsDataset.pbtxt +++ /dev/null @@ -1,4 +0,0 @@ -op { - graph_op_name: "FeatureStatsDataset" - visibility: HIDDEN -} diff --git a/tensorflow/core/api_def/python_api/api_def_ParseExampleDataset.pbtxt b/tensorflow/core/api_def/python_api/api_def_ParseExampleDataset.pbtxt new file mode 100644 index 0000000000..45826b6fdc --- /dev/null +++ b/tensorflow/core/api_def/python_api/api_def_ParseExampleDataset.pbtxt @@ -0,0 +1,4 @@ +op { + graph_op_name: "ParseExampleDataset" + visibility: HIDDEN +} diff --git a/tensorflow/core/api_def/python_api/api_def_ParseSequenceExample.pbtxt b/tensorflow/core/api_def/python_api/api_def_ParseSequenceExample.pbtxt new file mode 100644 index 0000000000..4a7e75ba0e --- /dev/null +++ b/tensorflow/core/api_def/python_api/api_def_ParseSequenceExample.pbtxt @@ -0,0 +1,4 @@ +op { + graph_op_name: "ParseSequenceExample" + visibility: HIDDEN +} diff --git a/tensorflow/core/api_def/python_api/api_def_ScatterNdSub.pbtxt b/tensorflow/core/api_def/python_api/api_def_ScatterNdSub.pbtxt new file mode 100644 index 0000000000..c1edef8c9d --- /dev/null +++ b/tensorflow/core/api_def/python_api/api_def_ScatterNdSub.pbtxt @@ -0,0 +1,4 @@ +op { + graph_op_name: "ScatterNdSub" + visibility: HIDDEN +} diff --git a/tensorflow/core/api_def/python_api/api_def_UnsafeDiv.pbtxt b/tensorflow/core/api_def/python_api/api_def_UnsafeDiv.pbtxt deleted file mode 100644 index 56caabcf3c..0000000000 --- a/tensorflow/core/api_def/python_api/api_def_UnsafeDiv.pbtxt +++ /dev/null @@ -1,4 +0,0 @@ -op { - graph_op_name: "UnsafeDiv" - visibility: HIDDEN -} |