সেন্সরফ্লো :: অপস :: সম্পাদনা দূরত্ব

#include <array_ops.h>

(সম্ভবত স্বাভাবিক করা) লেভেনস্টাইন সম্পাদনা দূরত্বকে গণনা করে।

সারসংক্ষেপ

ইনপুটগুলি স্পারেসটেন্সর (হাইপোথিসিস_ইন্ডিস, হাইপোথিসিস_ভ্যালিউস, হাইপোথিসিস_সাম্প) এবং (ট্রুথ_ইন্ডিস, ট্রুথ_ভ্যালিউস, ট্রুথ শেপ) সরবরাহ করে পরিবর্তনশীল দৈর্ঘ্যের ক্রম are

ইনপুটগুলি হ'ল:

যুক্তি:

  • সুযোগ: একটি স্কোপ অবজেক্ট
  • হাইপোথিসিস_ইন্ডিসেস: অনুমানের তালিকার সূচকগুলি স্পার্সটেনসর। এটি একটি এন এক্স আর ইন 64৪ ম্যাট্রিক্স।
  • হাইপোথিসিস_ভ্যালু: স্পার্সটেনসরের তালিকার মান। এটি একটি এন-দৈর্ঘ্যের ভেক্টর।
  • হাইপোথিসিস_শ্যাপ: স্পার্সটেনসরের অনুমানের তালিকার আকার। এটি একটি আর-দৈর্ঘ্যের ভেক্টর।
  • true_indices: সত্য তালিকার সূচকগুলি স্পার্সটেনসর। এটি একটি এম এক্স আর ইন 64৪ ম্যাট্রিক্স।
  • সত্য_মূল্যসমূহ: স্পার্সটেনসরের সত্য তালিকার মান। এটি একটি এম-দৈর্ঘ্যের ভেক্টর।
  • সত্য_প্রকার: সত্য সূচক, ভেক্টর।

Attrs বৈশিষ্ট্য ( Attrs ):

  • স্বাভাবিক করুন: বুলিয়ান (যদি সত্য হয় তবে সত্যের দৈর্ঘ্যের দ্বারা সম্পাদনা দূরত্বগুলি স্বাভাবিক করা হয়)।

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

রিটার্নস:

  • Output : আর -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)

স্ট্রাক্টস

টেনসরফ্লো :: অপস :: সম্পাদনা দূরত্ব :: সংযুক্তি

সম্পাদনা দূরত্বের জন্য alচ্ছিক বৈশিষ্ট্য নির্ধারক

জনসাধারণের গুণাবলী

অপারেশন

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 

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

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

Attrs Normalize(
  bool x
)