সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
#include <image_ops.h>
ইনপুট টেনসর থেকে একটি আভাস বের করে।
সারাংশ
ইনপুট টেনসর থেকে লোকেশন offsets
এক্সট্র্যাক্ট করা ঝলক নামক উইন্ডোগুলির একটি সেট ফেরত দেয়। যদি উইন্ডোগুলি শুধুমাত্র আংশিকভাবে ইনপুটগুলিকে ওভারল্যাপ করে, তবে অ ওভারল্যাপিং এলাকাগুলি এলোমেলো শব্দে পূর্ণ হবে।
ফলাফল হল আকৃতির একটি 4-ডি টেনসর [batch_size, glimpse_height, glimpse_width, channels]
। চ্যানেল এবং ব্যাচের মাত্রা ইনপুট টেনসরের মতোই। আউটপুট উইন্ডোগুলির উচ্চতা এবং প্রস্থ size
প্যারামিটারে নির্দিষ্ট করা হয়।
যুক্তি normalized
এবং centered
নিয়ন্ত্রণ করে কিভাবে উইন্ডোগুলি তৈরি করা হয়:
- যদি স্থানাঙ্কগুলি স্বাভাবিক করা হয় তবে কেন্দ্রীভূত না হয়, 0.0 এবং 1.0 প্রতিটি উচ্চতা এবং প্রস্থের মাত্রার সর্বনিম্ন এবং সর্বাধিকের সাথে মিলে যায়।
- যদি স্থানাঙ্কগুলি উভয়ই স্বাভাবিক এবং কেন্দ্রীভূত হয়, তবে সেগুলি -1.0 থেকে 1.0 পর্যন্ত হয়৷ স্থানাঙ্কগুলি (-1.0, -1.0) উপরের বাম কোণে অনুরূপ, নীচের ডান কোণটি (1.0, 1.0) এ অবস্থিত এবং কেন্দ্রটি (0, 0) এ অবস্থিত।
- যদি স্থানাঙ্কগুলি স্বাভাবিক করা না হয় তবে সেগুলিকে পিক্সেলের সংখ্যা হিসাবে ব্যাখ্যা করা হয়।
যুক্তি:
- স্কোপ: একটি স্কোপ অবজেক্ট
- ইনপুট: আকৃতির একটি 4-ডি ফ্লোট টেনসর
[batch_size, height, width, channels]
। - আকার: 2টি উপাদানের একটি 1-ডি টেনসর যাতে এক্সট্রাক্ট করার জন্য ঝলকের আকার থাকে। ঝলক উচ্চতা প্রথমে নির্দিষ্ট করা আবশ্যক, ঝলক প্রস্থ অনুসরণ করে।
- অফসেট: আকৃতির একটি 2-ডি পূর্ণসংখ্যা টেনসর
[batch_size, 2]
যাতে প্রতিটি উইন্ডোর কেন্দ্রের y, x অবস্থান থাকে।
ঐচ্ছিক বৈশিষ্ট্য (দেখুন Attrs
):
- কেন্দ্রীভূত: নির্দেশ করে যদি অফসেট স্থানাঙ্কগুলি চিত্রের সাথে কেন্দ্রীভূত হয়, এই ক্ষেত্রে (0, 0) অফসেট ইনপুট চিত্রগুলির কেন্দ্রের সাথে আপেক্ষিক। মিথ্যা হলে, (0,0) অফসেট ইনপুট চিত্রগুলির উপরের বাম কোণে অনুরূপ।
- normalized: অফসেট স্থানাঙ্ক স্বাভাবিক করা হয় কিনা নির্দেশ করে।
- uniform_noise: একটি অভিন্ন ডিস্ট্রিবিউশন বা গাউসিয়ান ডিস্ট্রিবিউশন ব্যবহার করে শব্দ তৈরি করা উচিত কিনা তা নির্দেশ করে।
- গোলমাল: শব্দটি
uniform
, gaussian
বা zero
হওয়া উচিত কিনা তা নির্দেশ করে। ডিফল্ট uniform
যার মানে গোলমালের ধরনটি uniform_noise
দ্বারা নির্ধারিত হবে।
রিটার্ন:
-
Output
: একটি টেনসর ঝলক প্রতিনিধিত্ব করে [batch_size, glimpse_height, glimpse_width, channels]
।
পাবলিক বৈশিষ্ট্য
পাবলিক ফাংশন
পাবলিক স্ট্যাটিক ফাংশন
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-26 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-26 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# tensorflow::ops::ExtractGlimpse Class Reference\n\ntensorflow::ops::ExtractGlimpse\n===============================\n\n`#include \u003cimage_ops.h\u003e`\n\nExtracts a glimpse from the input tensor.\n\nSummary\n-------\n\nReturns a set of windows called glimpses extracted at location `offsets` from the input tensor. If the windows only partially overlaps the inputs, the non overlapping areas will be filled with random noise.\n\nThe result is a 4-D tensor of shape `[batch_size, glimpse_height, glimpse_width, channels]`. The channels and batch dimensions are the same as that of the input tensor. The height and width of the output windows are specified in the `size` parameter.\n\nThe argument `normalized` and `centered` controls how the windows are built:\n\n\n- If the coordinates are normalized but not centered, 0.0 and 1.0 correspond to the minimum and maximum of each height and width dimension.\n- If the coordinates are both normalized and centered, they range from -1.0 to 1.0. The coordinates (-1.0, -1.0) correspond to the upper left corner, the lower right corner is located at (1.0, 1.0) and the center is at (0, 0).\n- If the coordinates are not normalized they are interpreted as numbers of pixels.\n\n\u003cbr /\u003e\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: A 4-D float tensor of shape `[batch_size, height, width, channels]`.\n- size: A 1-D tensor of 2 elements containing the size of the glimpses to extract. The glimpse height must be specified first, following by the glimpse width.\n- offsets: A 2-D integer tensor of shape `[batch_size, 2]` containing the y, x locations of the center of each window.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/extract-glimpse/attrs#structtensorflow_1_1ops_1_1_extract_glimpse_1_1_attrs)):\n\n- centered: indicates if the offset coordinates are centered relative to the image, in which case the (0, 0) offset is relative to the center of the input images. If false, the (0,0) offset corresponds to the upper left corner of the input images.\n- normalized: indicates if the offset coordinates are normalized.\n- uniform_noise: indicates if the noise should be generated using a uniform distribution or a Gaussian distribution.\n- noise: indicates if the noise should `uniform`, `gaussian`, or `zero`. The default is `uniform` which means the the noise type will be decided by `uniform_noise`.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): A tensor representing the glimpses `[batch_size, glimpse_height, glimpse_width, channels]`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ExtractGlimpse](#classtensorflow_1_1ops_1_1_extract_glimpse_1ac8a9c699708b7ed7837cd2f6d9c5c960)`(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, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` size, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` offsets)` ||\n| [ExtractGlimpse](#classtensorflow_1_1ops_1_1_extract_glimpse_1a9e09f2f0c3cdc346a18adf000df718e9)`(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, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` size, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` offsets, const `[ExtractGlimpse::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/extract-glimpse/attrs#structtensorflow_1_1ops_1_1_extract_glimpse_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [glimpse](#classtensorflow_1_1ops_1_1_extract_glimpse_1a07929fd965047271b887835daf6a62f0) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_extract_glimpse_1ad83cc8bc3adacbbfa83216270c26afdf) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_extract_glimpse_1a2c22fcc3334291ced5542888967da833)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_extract_glimpse_1aa8739e3ce187260c8592ff8ee5365479)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_extract_glimpse_1a7e4ec40626bb935caf4f267647539c1e)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| [Centered](#classtensorflow_1_1ops_1_1_extract_glimpse_1a1ae1ee7d233a8bb66ad6355cf707efb6)`(bool x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/extract-glimpse/attrs#structtensorflow_1_1ops_1_1_extract_glimpse_1_1_attrs) |\n| [Noise](#classtensorflow_1_1ops_1_1_extract_glimpse_1a9398870f40e6fb56cd7eabadb1be1320)`(StringPiece x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/extract-glimpse/attrs#structtensorflow_1_1ops_1_1_extract_glimpse_1_1_attrs) |\n| [Normalized](#classtensorflow_1_1ops_1_1_extract_glimpse_1a96c9927ae4bfed46c286e1d1675ed973)`(bool x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/extract-glimpse/attrs#structtensorflow_1_1ops_1_1_extract_glimpse_1_1_attrs) |\n| [UniformNoise](#classtensorflow_1_1ops_1_1_extract_glimpse_1a9d8371a16ba771a5c114029dd2f5ee00)`(bool x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/extract-glimpse/attrs#structtensorflow_1_1ops_1_1_extract_glimpse_1_1_attrs) |\n\n| ### Structs ||\n|-------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::ExtractGlimpse::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/extract-glimpse/attrs) | Optional attribute setters for [ExtractGlimpse](/versions/r1.15/api_docs/cc/class/tensorflow/ops/extract-glimpse#classtensorflow_1_1ops_1_1_extract_glimpse). |\n\nPublic attributes\n-----------------\n\n### glimpse\n\n```text\n::tensorflow::Output glimpse\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### ExtractGlimpse\n\n```gdscript\n ExtractGlimpse(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input size,\n ::tensorflow::Input offsets\n)\n``` \n\n### ExtractGlimpse\n\n```gdscript\n ExtractGlimpse(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input size,\n ::tensorflow::Input offsets,\n const ExtractGlimpse::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### Centered\n\n```text\nAttrs Centered(\n bool x\n)\n``` \n\n### Noise\n\n```text\nAttrs Noise(\n StringPiece x\n)\n``` \n\n### Normalized\n\n```text\nAttrs Normalized(\n bool x\n)\n``` \n\n### UniformNoise\n\n```text\nAttrs UniformNoise(\n bool x\n)\n```"]]