تدفق التوتر:: العمليات:: دلو
#include <math_ops.h>
يقوم بتجميع "المدخلات" بناءً على "الحدود".
ملخص
على سبيل المثال، إذا كانت المدخلات عبارة عن حدود = [0، 10، 100] الإدخال = [[-5، 10000] [150، 10] [5، 100]]
ثم سيكون الإخراج = [[0، 3] [3، 2] [1، 3]]
الحجج:
- النطاق: كائن النطاق
- الإدخال: أي شكل من أشكال Tensor يحتوي على نوع int أو float.
- الحدود: قائمة مرتبة من العوامات تعطي حدود الدلاء.
العوائد:
-
Output
: نفس الشكل مع "الإدخال"، مع استبدال كل قيمة من المدخلات بفهرس الجرافة.
(numpy) يعادل np.digitize.
البنائين والمدمرين | |
---|---|
Bucketize (const :: tensorflow::Scope & scope, :: tensorflow::Input input, const gtl::ArraySlice< float > & boundaries) |
الصفات العامة | |
---|---|
operation | |
output |
الوظائف العامة | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
الصفات العامة
عملية
Operation operation
الإخراج
::tensorflow::Output output
الوظائف العامة
دلو
Bucketize( const ::tensorflow::Scope & scope, ::tensorflow::Input input, const gtl::ArraySlice< float > & boundaries )
العقدة
::tensorflow::Node * node() const
المشغل::tensorflow::الإدخال
operator::tensorflow::Input() const
المشغل::tensorflow::الإخراج
operator::tensorflow::Output() const
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: [Any](/versions/r2.0/api_docs/cc/class/tensorflow/ops/any#classtensorflow_1_1ops_1_1_any) shape of [Tensor](/versions/r2.0/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/r2.0/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/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.0/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/r2.0/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_bucketize_1aa111bb19d459f3f26ae8f03297739125) | `::`[tensorflow::Output](/versions/r2.0/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```"]]