Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
tensor akışı:: işlem:: Paketleme
#include <math_ops.h>
'Girdiyi' 'sınırlara' göre paketler.
Özet
Örneğin, girişler sınır ise = [0, 10, 100] giriş = [[-5, 10000] [150, 10] [5, 100]]
bu durumda çıktının çıktısı = [[0, 3] [3, 2] [1, 3]] olacaktır.
Argümanlar:
- kapsam: Bir Kapsam nesnesi
- giriş: int veya float tipinde Tensor'un herhangi bir şekli bulunur.
- sınırlar: Sıralı bir kayan nokta listesi, kovaların sınırlarını verir.
İade:
-
Output
: 'Giriş' ile aynı şekil, girişin her değeri kova endeksiyle değiştirilir.
(numpy) np.digitize'a eşdeğerdir.
Genel özellikler
Kamu işlevleri
düğüm
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operatör::tensorflow::Çıktı
operator::tensorflow::Output() const
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-26 UTC."],[],[],null,["# tensorflow::ops::Bucketize Class Reference\n\ntensorflow::ops::Bucketize\n==========================\n\n`#include \u003cmath_ops.h\u003e`\n\nBucketizes 'input' based on 'boundaries'.\n\nSummary\n-------\n\nFor example, if the inputs are boundaries = \\[0, 10, 100\\] input = \\[\\[-5, 10000\\] \\[150, 10\\] \\[5, 100\\]\\]\n\nthen the output will be output = \\[\\[0, 3\\] \\[3, 2\\] \\[1, 3\\]\\]\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: [Any](/versions/r1.15/api_docs/cc/class/tensorflow/ops/any#classtensorflow_1_1ops_1_1_any) shape of [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) contains with int or float type.\n- boundaries: A sorted list of floats gives the boundary of the buckets.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): Same shape with 'input', each value of input replaced with bucket index.\n\n\u003cbr /\u003e\n\n(numpy) Equivalent to np.digitize.\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Bucketize](#classtensorflow_1_1ops_1_1_bucketize_1a104987760896f84594d21a17738a6fe1)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, const gtl::ArraySlice\u003c float \u003e & boundaries)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_bucketize_1a11d9d7e39578db3e3dfaf2ef9213ae34) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_bucketize_1aa111bb19d459f3f26ae8f03297739125) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_bucketize_1af82e929e268a0301d7ce4c41480a19e4)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_bucketize_1a7d66691237f8de46ab0c52782419cf53)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_bucketize_1aa3f697a162b180d9aa7847cb7d22dc3e)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### Bucketize\n\n```gdscript\n Bucketize(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n const gtl::ArraySlice\u003c float \u003e & boundaries\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n```"]]