Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::TopK::Attrs
#include <nn_ops.h>
Optional attribute setters for TopK.
Summary
Public functions
|
IndexType(DataType x)
|
Defaults to DT_INT32.
|
Sorted(bool x)
|
If true the resulting k elements will be sorted by the values in descending order.
|
Public attributes
index_type_
DataType tensorflow::ops::TopK::Attrs::index_type_ = DT_INT32
sorted_
bool tensorflow::ops::TopK::Attrs::sorted_ = true
Public functions
IndexType
TF_MUST_USE_RESULT Attrs tensorflow::ops::TopK::Attrs::IndexType(
DataType x
)
Sorted
TF_MUST_USE_RESULT Attrs tensorflow::ops::TopK::Attrs::Sorted(
bool x
)
If true the resulting k
elements will be sorted by the values in descending order.
Defaults to true
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,["# tensorflow::ops::TopK::Attrs Struct Reference\n\ntensorflow::ops::TopK::Attrs\n============================\n\n`#include \u003cnn_ops.h\u003e`\n\nOptional attribute setters for [TopK](/versions/r2.14/api_docs/cc/class/tensorflow/ops/top-k#classtensorflow_1_1ops_1_1_top_k).\n\nSummary\n-------\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------------------------|------------|\n| [index_type_](#structtensorflow_1_1ops_1_1_top_k_1_1_attrs_1a0ce5dbbb461fb199fc8064e46db73b98)` = DT_INT32` | `DataType` |\n| [sorted_](#structtensorflow_1_1ops_1_1_top_k_1_1_attrs_1abbbe7daa73e35807a6e801d71818d7d6)` = true` | `bool` |\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [IndexType](#structtensorflow_1_1ops_1_1_top_k_1_1_attrs_1a60cf8d02b3b34ac440177fdad80c591e)`(DataType x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/top-k/attrs#structtensorflow_1_1ops_1_1_top_k_1_1_attrs) Defaults to DT_INT32. |\n| [Sorted](#structtensorflow_1_1ops_1_1_top_k_1_1_attrs_1ae56fc99e004be4f8fc11ecaefb1bedc4)`(bool x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/top-k/attrs#structtensorflow_1_1ops_1_1_top_k_1_1_attrs) If true the resulting `k` elements will be sorted by the values in descending order. |\n\nPublic attributes\n-----------------\n\n### index_type_\n\n```carbon\nDataType tensorflow::ops::TopK::Attrs::index_type_ = DT_INT32\n``` \n\n### sorted_\n\n```scdoc\nbool tensorflow::ops::TopK::Attrs::sorted_ = true\n``` \n\nPublic functions\n----------------\n\n### IndexType\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::TopK::Attrs::IndexType(\n DataType x\n)\n``` \nDefaults to DT_INT32. \n\n### Sorted\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::TopK::Attrs::Sorted(\n bool x\n)\n``` \nIf true the resulting `k` elements will be sorted by the values in descending order.\n\nDefaults to true"]]