@@ -427,13 +427,13 @@ def min( # pylint: disable=redefined-builtin
427427 x : common_types .TensorType ,
428428 reduce_instance_dims : bool = True ,
429429 name : Optional [str ] = None ) -> tf .Tensor :
430- """Computes the minimum of the values of a `Tensor ` over the whole dataset.
430+ """Computes the minimum of the values of `x ` over the whole dataset.
431431
432432 In the case of a `CompositeTensor` missing values will be used in return
433433 value: for float, NaN is used and for other dtypes the max is used.
434434
435435 Args:
436- x: A `Tensor` or `CompositeTensor `.
436+ x: A `Tensor`, `SparseTensor`, or `RaggedTensor `.
437437 reduce_instance_dims: By default collapses the batch and instance dimensions
438438 to arrive at a single scalar output. If False, only collapses the batch
439439 dimension and outputs a `Tensor` of the same shape as the input.
@@ -454,13 +454,13 @@ def max( # pylint: disable=redefined-builtin
454454 x : common_types .TensorType ,
455455 reduce_instance_dims : bool = True ,
456456 name : Optional [str ] = None ) -> tf .Tensor :
457- """Computes the maximum of the values of a `Tensor ` over the whole dataset.
457+ """Computes the maximum of the values of `x ` over the whole dataset.
458458
459459 In the case of a `CompositeTensor` missing values will be used in return
460460 value: for float, NaN is used and for other dtypes the min is used.
461461
462462 Args:
463- x: A `Tensor` or `CompositeTensor `.
463+ x: A `Tensor`, `SparseTensor`, or `RaggedTensor `.
464464 reduce_instance_dims: By default collapses the batch and instance dimensions
465465 to arrive at a single scalar output. If False, only collapses the batch
466466 dimension and outputs a vector of the same shape as the input.
@@ -478,14 +478,14 @@ def max( # pylint: disable=redefined-builtin
478478def _min_and_max (x : common_types .TensorType ,
479479 reduce_instance_dims : bool = True ,
480480 name : Optional [str ] = None ) -> Tuple [tf .Tensor , tf .Tensor ]:
481- """Computes the min and max of the values of a `Tensor` or `CompositeTensor `.
481+ """Computes the min and max of the values of `x `.
482482
483483 In the case of a `CompositeTensor` missing values will be used in return
484484 value:
485485 for float, NaN is used and for other dtypes the min is used.
486486
487487 Args:
488- x: A `Tensor` or `CompositeTensor `.
488+ x: A `Tensor`, `SparseTensor`, or `RaggedTensor `.
489489 reduce_instance_dims: By default collapses the batch and instance dimensions
490490 to arrive at a single scalar output. If False, only collapses the batch
491491 dimension and outputs a vector of the same shape as the input.
@@ -530,7 +530,7 @@ def _min_and_max_per_key(
530530 key_vocabulary_filename : Optional [str ] = None ,
531531 name : Optional [str ] = None
532532) -> Union [Tuple [tf .Tensor , tf .Tensor , tf .Tensor ], tf .Tensor ]:
533- """Computes the min and max of the values of a `Tensor` or `CompositeTensor `.
533+ """Computes the min and max of the values of `x `.
534534
535535 In the case of a `CompositeTensor` missing values will be used in return
536536 value: for float, NaN is used and for other dtypes the min is used.
@@ -541,10 +541,10 @@ def _min_and_max_per_key(
541541 available in a future version.
542542
543543 Args:
544- x: A `Tensor` or `CompositeTensor `.
545- key: A Tensor or `CompositeTensor ` of dtype tf.string. If `x` is a
546- `CompositeTensor`, `key` must exactly match `x` in everything except
547- values.
544+ x: A `Tensor`, `SparseTensor`, or `RaggedTensor `.
545+ key: A ` Tensor`, `SparseTensor`, or `RaggedTensor ` of dtype tf.string. If
546+ `x` is a ` CompositeTensor`, `key` must exactly match `x` in everything
547+ except values.
548548 reduce_instance_dims: By default collapses the batch and instance dimensions
549549 to arrive at a single scalar output. If False, only collapses the batch
550550 dimension and outputs a vector of the same shape as the input. The False
@@ -628,9 +628,9 @@ def sum( # pylint: disable=redefined-builtin
628628 """Computes the sum of the values of a `Tensor` over the whole dataset.
629629
630630 Args:
631- x: A `Tensor` or `CompositeTensor `. Its type must be floating point
632- (float{16|32|64}),integral (int{8|16|32|64}), or
633- unsigned integral (uint{8|16})
631+ x: A `Tensor`, `SparseTensor`, or `RaggedTensor `. Its type must be floating
632+ point (float{16|32|64}),integral (int{8|16|32|64}), or unsigned
633+ integral (uint{8|16}).
634634 reduce_instance_dims: By default collapses the batch and instance dimensions
635635 to arrive at a single scalar output. If False, only collapses the batch
636636 dimension and outputs a vector of the same shape as the input.
@@ -694,7 +694,7 @@ def histogram(x: common_types.TensorType,
694694 zip(classes, probabilities)))
695695
696696 Args:
697- x: A `Tensor` or `CompositeTensor `.
697+ x: A `Tensor`, `SparseTensor`, or `RaggedTensor `.
698698 boundaries: (Optional) A `Tensor` or `int` used to build the histogram;
699699 ignored if `categorical` is True. If possible, provide boundaries as
700700 multiple sorted values. Default to 10 intervals over the 0-1 range, or
@@ -746,7 +746,7 @@ def size(x: common_types.TensorType,
746746 """Computes the total size of instances in a `Tensor` over the whole dataset.
747747
748748 Args:
749- x: A `Tensor` or `CompositeTensor `.
749+ x: A `Tensor`, `SparseTensor`, or `RaggedTensor `.
750750 reduce_instance_dims: By default collapses the batch and instance dimensions
751751 to arrive at a single scalar output. If False, only collapses the batch
752752 dimension and outputs a vector of the same shape as the input.
@@ -774,7 +774,8 @@ def count_per_key(key: common_types.TensorType,
774774 """Computes the count of each element of a `Tensor`.
775775
776776 Args:
777- key: A Tensor or `CompositeTensor` of dtype tf.string or tf.int.
777+ key: A `Tensor`, `SparseTensor`, or `RaggedTensor` of dtype tf.string or
778+ tf.int.
778779 key_vocabulary_filename: (Optional) The file name for the key-output mapping
779780 file. If None and key are provided, this combiner assumes the keys fit in
780781 memory and will not store the result in a file. If empty string, a file
@@ -824,8 +825,8 @@ def mean(x: common_types.TensorType,
824825 """Computes the mean of the values of a `Tensor` over the whole dataset.
825826
826827 Args:
827- x: A `Tensor` or `CompositeTensor `. Its type must be floating point
828- (float{16|32|64}), or integral ([u]int{8|16|32|64}).
828+ x: A `Tensor`, `SparseTensor`, or `RaggedTensor `. Its type must be floating
829+ point (float{16|32|64}), or integral ([u]int{8|16|32|64}).
829830 reduce_instance_dims: By default collapses the batch and instance dimensions
830831 to arrive at a single scalar output. If False, only collapses the batch
831832 dimension and outputs a vector of the same shape as the input.
@@ -855,8 +856,8 @@ def var(x: common_types.TensorType,
855856 (x - mean(x))**2 / length(x).
856857
857858 Args:
858- x: `Tensor` or `CompositeTensor `. Its type must be floating point
859- (float{16|32|64}), or integral ([u]int{8|16|32|64}).
859+ x: `Tensor`, `SparseTensor`, or `RaggedTensor `. Its type must be floating
860+ point (float{16|32|64}), or integral ([u]int{8|16|32|64}).
860861 reduce_instance_dims: By default collapses the batch and instance dimensions
861862 to arrive at a single scalar output. If False, only collapses the batch
862863 dimension and outputs a vector of the same shape as the input.
@@ -930,8 +931,8 @@ def tukey_location(x: common_types.TensorType,
930931 Mathematics, vol. 2012, 2012. doi:10.5402/2012/980153
931932
932933 Args:
933- x: A `Tensor` or `CompositeTensor `. Its type must be floating point
934- (float{16|32|64}), or integral ([u]int{8|16|32|64}).
934+ x: A `Tensor`, `SparseTensor`, or `RaggedTensor `. Its type must be floating
935+ point (float{16|32|64}), or integral ([u]int{8|16|32|64}).
935936 reduce_instance_dims: By default collapses the batch and instance dimensions
936937 to arrive at a single scalar output. If False, only collapses the batch
937938 dimension and outputs a vector of the same shape as the input.
@@ -968,8 +969,8 @@ def tukey_scale(x: common_types.TensorType,
968969
969970
970971 Args:
971- x: A `Tensor` or `CompositeTensor `. Its type must be floating point
972- (float{16|32|64}), or integral ([u]int{8|16|32|64}).
972+ x: A `Tensor`, `SparseTensor`, or `RaggedTensor `. Its type must be floating
973+ point (float{16|32|64}), or integral ([u]int{8|16|32|64}).
973974 reduce_instance_dims: By default collapses the batch and instance dimensions
974975 to arrive at a single scalar output. If False, only collapses the batch
975976 dimension and outputs a vector of the same shape as the input.
@@ -1005,8 +1006,8 @@ def tukey_h_params(x: common_types.TensorType,
10051006 Mathematics, vol. 2012, 2012. doi:10.5402/2012/980153
10061007
10071008 Args:
1008- x: A `Tensor` or `CompositeTensor `. Its type must be floating point
1009- (float{16|32|64}), or integral ([u]int{8|16|32|64}).
1009+ x: A `Tensor`, `SparseTensor`, or `RaggedTensor `. Its type must be floating
1010+ point (float{16|32|64}), or integral ([u]int{8|16|32|64}).
10101011 reduce_instance_dims: By default collapses the batch and instance dimensions
10111012 to arrive at a single scalar output. If False, only collapses the batch
10121013 dimension and outputs a vector of the same shape as the input.
@@ -1075,10 +1076,10 @@ def _mean_and_var_per_key(
10751076 """`mean_and_var` by group, specified by key.
10761077
10771078 Args:
1078- x: A `Tensor` or `CompositeTensor `.
1079- key: A Tensor or `CompositeTensor ` of dtype tf.string. If `x` is
1080- a `CompositeTensor`, `key` must exactly match `x` in everything except
1081- values.
1079+ x: A `Tensor`, `SparseTensor`, or `RaggedTensor `.
1080+ key: A ` Tensor`, `SparseTensor`, or `RaggedTensor ` of dtype tf.string. If
1081+ `x` is a `CompositeTensor`, `key` must exactly match `x` in everything
1082+ except values.
10821083 reduce_instance_dims: (Optional) By default collapses the batch and instance
10831084 dimensions to arrive at a single scalar output. The False case is not
10841085 currently supported for _mean_and_var_per_key.
@@ -1726,11 +1727,11 @@ def vocabulary(
17261727 file_format : common_types
17271728 .VocabularyFileFormatType = DEFAULT_VOCABULARY_FILE_FORMAT ,
17281729 name : Optional [str ] = None ) -> common_types .TemporaryAnalyzerOutputType :
1729- r"""Computes the unique values of a `Tensor ` over the whole dataset.
1730+ r"""Computes the unique values of `x ` over the whole dataset.
17301731
1731- Computes The unique values taken by `x`, which can be a `Tensor` or
1732- `CompositeTensor` of any size. The unique values will be aggregated over all
1733- dimensions of `x` and all instances.
1732+ Computes The unique values taken by `x`, which can be a `Tensor`,
1733+ `SparseTensor`, or `RaggedTensor` of any size. The unique values will be
1734+ aggregated over all dimensions of `x` and all instances.
17341735
17351736 In case `file_format` is 'text' and one of the tokens contains the '\n' or
17361737 '\r' characters or is empty it will be discarded.
@@ -1774,9 +1775,9 @@ def vocabulary(
17741775 within each vocabulary entry (b/117796748).
17751776
17761777 Args:
1777- x: A categorical/discrete input `Tensor` or `CompositeTensor` with dtype
1778- tf.string or tf.int[8|16|32|64]. The inputs should generally be unique per
1779- row (i.e. a bag of words/ngrams representation).
1778+ x: A categorical/discrete input `Tensor`, `SparseTensor`, or `RaggedTensor`
1779+ with dtype tf.string or tf.int[8|16|32|64]. The inputs should generally be
1780+ unique per row (i.e. a bag of words/ngrams representation).
17801781 top_k: Limit the generated vocabulary to the first `top_k` elements. If set
17811782 to None, the full vocabulary is generated.
17821783 frequency_threshold: Limit the generated vocabulary only to elements whose
0 commit comments