tensorflow :: ops :: ویرایش فاصله
#include <array_ops.h>
فاصله ویرایش Levenshtein (احتمالاً نرمال) را محاسبه می کند.
خلاصه
ورودی ها توالی هایی با طول متغیر هستند که توسط SparseTensors (فرضیه_ها ، مقادیر_فرضیه ، فرم_فرضیه) و (شاخصهای_حقیقت ، ارزشهای_حقیقت ، شکل_حقیقت) ارائه می شوند.
ورودی ها عبارتند از:
استدلال ها:
- دامنه: یک شی Sc Scope
- hypothesis_indices: شاخص های لیست فرضیه SparseTensor. این یک ماتریس N x R int64 است.
- hypothesis_values: مقادیر لیست فرضیه SparseTensor. این یک بردار به طول N است.
- hypothesis_shape: شکل لیست فرضیه SparseTensor. این یک بردار به طول R است.
- index_indices: شاخص های لیست حقیقت SparseTensor. این یک ماتریس M x R int64 است.
- true_values: مقادیر لیست حقیقت SparseTensor. این یک بردار به طول M است.
- صدق_ شکل: شاخص های حقیقت ، بردار.
ویژگی های اختیاری (به Attrs
مراجعه کنید):
- normalize: بولی (اگر درست است ، فاصله ویرایش با طول حقیقت نرمال می شود).
خروجی:
بازده:
-
Output
: یک تانسور شناور متراکم با درجه R - 1.
برای مثال ورودی:
// hypothesis represents a 2x1 matrix with variable-length values: // (0,0) = ["a"] // (1,0) = ["b"] hypothesis_indices = [[0, 0, 0], [1, 0, 0]] hypothesis_values = ["a", "b"] hypothesis_shape = [2, 1, 1] // truth represents a 2x2 matrix with variable-length values: // (0,0) = [] // (0,1) = ["a"] // (1,0) = ["b", "c"] // (1,1) = ["a"] truth_indices = [[0, 1, 0], [1, 0, 0], [1, 0, 1], [1, 1, 0]] truth_values = ["a", "b", "c", "a"] truth_shape = [2, 2, 2] normalize = true
خروجی:
// output is a 2x2 matrix with edit distances normalized by truth lengths. output = [[inf, 1.0], // (0,0): no truth, (0,1): no hypothesis [0.5, 1.0]] // (1,0): addition, (1,1): no hypothesisخواهد بود
سازندگان و ویرانگران | |
---|---|
EditDistance (const :: tensorflow::Scope & scope, :: tensorflow::Input hypothesis_indices, :: tensorflow::Input hypothesis_values, :: tensorflow::Input hypothesis_shape, :: tensorflow::Input truth_indices, :: tensorflow::Input truth_values, :: tensorflow::Input truth_shape) | |
EditDistance (const :: tensorflow::Scope & scope, :: tensorflow::Input hypothesis_indices, :: tensorflow::Input hypothesis_values, :: tensorflow::Input hypothesis_shape, :: tensorflow::Input truth_indices, :: tensorflow::Input truth_values, :: tensorflow::Input truth_shape, const EditDistance::Attrs & attrs) |
صفات عمومی | |
---|---|
operation | |
output |
کارکردهای عمومی | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
توابع استاتیک عمومی | |
---|---|
Normalize (bool x) |
سازه ها | |
---|---|
tensorflow :: ops :: EditDistance :: Attrs | تنظیم کننده های ویژگی اختیاری برای EditDistance . |
صفات عمومی
عمل
Operation operation
خروجی
::tensorflow::Output output
کارکردهای عمومی
ویرایش فاصله
EditDistance( const ::tensorflow::Scope & scope, ::tensorflow::Input hypothesis_indices, ::tensorflow::Input hypothesis_values, ::tensorflow::Input hypothesis_shape, ::tensorflow::Input truth_indices, ::tensorflow::Input truth_values, ::tensorflow::Input truth_shape )
ویرایش فاصله
EditDistance( const ::tensorflow::Scope & scope, ::tensorflow::Input hypothesis_indices, ::tensorflow::Input hypothesis_values, ::tensorflow::Input hypothesis_shape, ::tensorflow::Input truth_indices, ::tensorflow::Input truth_values, ::tensorflow::Input truth_shape, const EditDistance::Attrs & attrs )
گره
::tensorflow::Node * node() const
عملگر :: tensorflow :: ورودی
operator::tensorflow::Input() const
عملگر :: tensorflow :: خروجی
operator::tensorflow::Output() const
توابع استاتیک عمومی
عادی سازی کنید
Attrs Normalize( bool x )
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2020-04-20 بهوقت ساعت هماهنگ جهانی.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"اطلاعاتی که نیاز دارم وجود ندارد"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"بیشازحد پیچیده/ مراحل بسیار زیاد"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"قدیمی"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"مشکل ترجمه"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"مشکل کد / نمونهها"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"غیره"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"درک آسان"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"مشکلم را برطرف کرد"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"غیره"
}]