tensorflow:: ops:: EditDistance

#include <array_ops.h>

(সম্ভবত স্বাভাবিকীকৃত) লেভেনস্টাইন এডিট ডিসটেন্স গণনা করে।

সারসংক্ষেপ

ইনপুটগুলো হলো SparseTensors দ্বারা প্রদত্ত পরিবর্তনশীল দৈর্ঘ্যের সিকোয়েন্স (hypothesis_indices, hypothesis_values, hypothesis_shape) এবং (truth_indices, truth_values, truth_shape)।

ইনপুটগুলো হলো:

যুক্তি:

  • স্কোপ: একটি স্কোপ অবজেক্ট
  • hypothesis_indices: SparseTensor-এর হাইপোথিসিস তালিকার সূচকসমূহ। এটি একটি N x R int64 ম্যাট্রিক্স।
  • hypothesis_values: SparseTensor হাইপোথিসিস তালিকার মানসমূহ। এটি একটি N-দৈর্ঘ্যের ভেক্টর।
  • hypothesis_shape: হাইপোথিসিস তালিকা SparseTensor-এর আকৃতি। এটি একটি R-দৈর্ঘ্যের ভেক্টর।
  • truth_indices: SparseTensor-এর ট্রুথ লিস্টের ইন্ডেক্সসমূহ। এটি একটি M x R int64 ম্যাট্রিক্স।
  • truth_values: SparseTensor-এর ট্রুথ লিস্টের মানসমূহ। এটি একটি M-দৈর্ঘ্যের ভেক্টর।
  • truth_shape: সত্য সূচকসমূহ, ভেক্টর।

ঐচ্ছিক অ্যাট্রিবিউটসমূহ (দেখুন Attrs ):

  • নর্মালাইজ: বুলিয়ান (যদি ট্রু হয়, এডিট ডিসট্যান্সগুলোকে লেংথ অফ ট্রুথ দ্বারা নর্মালাইজ করা হয়)।

আউটপুটটি হলো:

ফেরত:

  • 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 

অপারেটর::টেনসরফ্লো::ইনপুট

 operator::tensorflow::Input() const 

অপারেটর::টেনসরফ্লো::আউটপুট

 operator::tensorflow::Output() const 

পাবলিক স্ট্যাটিক ফাংশন

স্বাভাবিক করুন

Attrs Normalize(
  bool x
)