সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
টেনসরফ্লো :: অপস:: হিস্টোগ্রাম ফিক্সড প্রস্থ
#include <math_ops.h>
মানের হিস্টোগ্রাম ফেরত দিন।
সারাংশ
প্রদত্ত টেনসর values
, এই অপারেশনটি একটি র্যাঙ্ক 1 হিস্টোগ্রাম প্রদান করে যা প্রতিটি বিনের মধ্যে পড়ে থাকা values
এন্ট্রির সংখ্যা গণনা করে৷ বিনগুলি সমান প্রস্থ এবং আর্গুমেন্ট value_range
এবং nbins
দ্বারা নির্ধারিত হয়।
# Bins will be: (-inf, 1), [1, 2), [2, 3), [3, 4), [4, inf)
nbins = 5
value_range = [0.0, 5.0]
new_values = [-1.0, 0.0, 1.5, 2.0, 5.0, 15]
with tf.get_default_session() as sess:
hist = tf.histogram_fixed_width(new_values, value_range, nbins=5)
variables.global_variables_initializer().run()
sess.run(hist) => [2, 1, 1, 0, 2]
যুক্তি:
- স্কোপ: একটি স্কোপ অবজেক্ট
- মান: সংখ্যাসূচক
Tensor
। - মান_পরিসীমা: আকৃতি [২]
values
হিসাবে একই dtype
Tensor
। মান <= value_range[0] হিস্টে ম্যাপ করা হবে[0], মানগুলি >= value_range[1] হিস্টে ম্যাপ করা হবে[-1]। - nbins: স্কেলার
int32 Tensor
। হিস্টোগ্রাম বিন সংখ্যা.
রিটার্ন:
পাবলিক স্ট্যাটিক ফাংশন |
---|
Dtype (DataType x) | |
পাবলিক বৈশিষ্ট্য
পাবলিক ফাংশন
নোড
::tensorflow::Node * node() const
operator::tensorflow::Input() const
অপারেটর::টেনসরফ্লো::আউটপুট
operator::tensorflow::Output() const
পাবলিক স্ট্যাটিক ফাংশন
ডিটাইপ
Attrs Dtype(
DataType x
)
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# tensorflow::ops::HistogramFixedWidth Class Reference\n\ntensorflow::ops::HistogramFixedWidth\n====================================\n\n`#include \u003cmath_ops.h\u003e`\n\nReturn histogram of values.\n\nSummary\n-------\n\nGiven the tensor `values`, this operation returns a rank 1 histogram counting the number of entries in `values` that fall into every bin. The bins are equal width and determined by the arguments `value_range` and `nbins`.\n\n\n```scdoc\n# Bins will be: (-inf, 1), [1, 2), [2, 3), [3, 4), [4, inf)\nnbins = 5\nvalue_range = [0.0, 5.0]\nnew_values = [-1.0, 0.0, 1.5, 2.0, 5.0, 15]\n```\n\n\u003cbr /\u003e\n\n\n```gdscript\nwith tf.get_default_session() as sess:\n hist = tf.histogram_fixed_width(new_values, value_range, nbins=5)\n variables.global_variables_initializer().run()\n sess.run(hist) =\u003e [2, 1, 1, 0, 2]\n```\n\n\u003cbr /\u003e\n\nArguments:\n\n- scope: A [Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- values: Numeric [Tensor](/versions/r2.0/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor).\n- value_range: Shape \\[2\\] [Tensor](/versions/r2.0/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of same `dtype` as `values`. values \\\u003c= value_range\\[0\\] will be mapped to hist\\[0\\], values \\\u003e= value_range\\[1\\] will be mapped to hist\\[-1\\].\n- nbins: Scalar `int32 `[Tensor](/versions/r2.0/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor). Number of histogram bins.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): A 1-D [Tensor](/versions/r2.0/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) holding histogram of values.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [HistogramFixedWidth](#classtensorflow_1_1ops_1_1_histogram_fixed_width_1a333002784eada5d11649a32ff58a5bce)`(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)` values, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` value_range, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` nbins)` ||\n| [HistogramFixedWidth](#classtensorflow_1_1ops_1_1_histogram_fixed_width_1a1284e095c6b69e072988d8beecea179f)`(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)` values, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` value_range, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` nbins, const `[HistogramFixedWidth::Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/histogram-fixed-width/attrs#structtensorflow_1_1ops_1_1_histogram_fixed_width_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_histogram_fixed_width_1a34fee699d7f4fdb4577eb33f6f46c23c) | [Operation](/versions/r2.0/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [out](#classtensorflow_1_1ops_1_1_histogram_fixed_width_1a587b8e7c9541b52daed045e791a0520d) | `::`[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_histogram_fixed_width_1afa5f92867dd3834b3808d6d25177c002)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_histogram_fixed_width_1a699360f21e94439323f32adaa8b09e30)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_histogram_fixed_width_1a4136d809be17e0bbd261e44d9dd9b377)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|-------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Dtype](#classtensorflow_1_1ops_1_1_histogram_fixed_width_1a9856da0e7bf5f4751e54495801a9f8e2)`(DataType x)` | [Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/histogram-fixed-width/attrs#structtensorflow_1_1ops_1_1_histogram_fixed_width_1_1_attrs) |\n\n| ### Structs ||\n|-----------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::HistogramFixedWidth::Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/histogram-fixed-width/attrs) | Optional attribute setters for [HistogramFixedWidth](/versions/r2.0/api_docs/cc/class/tensorflow/ops/histogram-fixed-width#classtensorflow_1_1ops_1_1_histogram_fixed_width). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### out\n\n```text\n::tensorflow::Output out\n``` \n\nPublic functions\n----------------\n\n### HistogramFixedWidth\n\n```gdscript\n HistogramFixedWidth(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input values,\n ::tensorflow::Input value_range,\n ::tensorflow::Input nbins\n)\n``` \n\n### HistogramFixedWidth\n\n```gdscript\n HistogramFixedWidth(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input values,\n ::tensorflow::Input value_range,\n ::tensorflow::Input nbins,\n const HistogramFixedWidth::Attrs & attrs\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``` \n\nPublic static functions\n-----------------------\n\n### Dtype\n\n```carbon\nAttrs Dtype(\n DataType x\n)\n```"]]