tf.raw_ops.SetSize
Stay organized with collections
Save and categorize content based on your preferences.
Number of unique elements along last dimension of input set
.
tf.raw_ops.SetSize(
set_indices, set_values, set_shape, validate_indices=True, name=None
)
Input set
is a SparseTensor
represented by set_indices
, set_values
,
and set_shape
. The last dimension contains values in a set, duplicates are
allowed but ignored.
If validate_indices
is True
, this op validates the order and range of set
indices. Setting is to False
while passing invalid arguments results in
undefined behavior.
Args |
set_indices
|
A Tensor of type int64 .
2D Tensor , indices of a SparseTensor .
|
set_values
|
A Tensor . Must be one of the following types: int8 , int16 , int32 , int64 , uint8 , uint16 , string .
1D Tensor , values of a SparseTensor .
|
set_shape
|
A Tensor of type int64 .
1D Tensor , shape of a SparseTensor .
|
validate_indices
|
An optional bool . Defaults to True .
|
name
|
A name for the operation (optional).
|
Returns |
A Tensor of type int32 .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tf.raw_ops.SetSize\n\n\u003cbr /\u003e\n\nNumber of unique elements along last dimension of input `set`.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.raw_ops.SetSize`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/SetSize)\n\n\u003cbr /\u003e\n\n tf.raw_ops.SetSize(\n set_indices, set_values, set_shape, validate_indices=True, name=None\n )\n\nInput `set` is a `SparseTensor` represented by `set_indices`, `set_values`,\nand `set_shape`. The last dimension contains values in a set, duplicates are\nallowed but ignored.\n\nIf `validate_indices` is `True`, this op validates the order and range of `set`\nindices. Setting is to `False` while passing invalid arguments results in\nundefined behavior.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `set_indices` | A `Tensor` of type `int64`. 2D `Tensor`, indices of a `SparseTensor`. |\n| `set_values` | A `Tensor`. Must be one of the following types: `int8`, `int16`, `int32`, `int64`, `uint8`, `uint16`, `string`. 1D `Tensor`, values of a `SparseTensor`. |\n| `set_shape` | A `Tensor` of type `int64`. 1D `Tensor`, shape of a `SparseTensor`. |\n| `validate_indices` | An optional `bool`. Defaults to `True`. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Tensor` of type `int32`. ||\n\n\u003cbr /\u003e"]]