تدفق التوتر:: العمليات:: مثال على ParseSingleSequence

#include <parsing_ops.h>

يحول الدماغ العددي.SequenceExample proto (على شكل سلاسل) إلى موترات مكتوبة.

ملخص

الحجج:

  • النطاق: كائن النطاق
  • متسلسل: عددي يحتوي على نموذج SequenceExample ثنائي متسلسل.
  • feature_list_dense_missing_assumed_empty: متجه يسرد مفاتيح FeaturesList التي قد تكون مفقودة من SequenceExample. إذا كانت قائمة الميزات المرتبطة مفقودة، فسيتم التعامل معها على أنها فارغة. بشكل افتراضي، يجب أن تكون أي قائمة ميزات غير مدرجة في هذا الموجه موجودة في SequenceExample.
  • context_sparse_keys: قائمة بسلسلة Ncontext_sparse Tensors (الحجميات). المفاتيح المتوقعة في ميزات الأمثلة المرتبطة بقيم context_sparse.
  • context_dense_keys: قائمة بسلسلة Ncontext_dense Tensors (الحجميات). المفاتيح المتوقعة في ميزات سياق SequenceExamples المرتبطة بالقيم الكثيفة.
  • feature_list_sparse_keys: قائمة بسلسلة Nfeature_list_sparse Tensors (العددية). المفاتيح المتوقعة في قوائم الميزات المرتبطة بالقيم المتفرقة.
  • feature_list_dense_keys: قائمة بسلسلة Nfeature_list_dense Tensors (العددية). المفاتيح المتوقعة في قوائم ميزات SequenceExamples المرتبطة بقوائم القيم الكثيفة.
  • context_dense_defaults: قائمة بموترات Ncontext_dense (قد يكون بعضها فارغًا). يوفر context_dense_defaults[j] القيم الافتراضية عندما تفتقر خريطة سياق SequenceExample إلى context_dense_key[j]. إذا تم توفير Tensor فارغًا لـ context_dense_defaults[j]، فستكون الميزة context_dense_keys[j] مطلوبة. يتم استنتاج نوع الإدخال من context_dense_defaults[j]، حتى عندما يكون فارغًا. إذا لم يكن context_dense_defaults[j] فارغًا، فيجب أن يتطابق شكله مع context_dense_shapes[j].
  • debug_name: عددي يحتوي على اسم النموذج الأولي المتسلسل. قد يحتوي، على سبيل المثال، على اسم مفتاح الجدول (الوصفي) للنموذج الأولي المتسلسل المقابل. وهذا مفيد فقط لأغراض تصحيح الأخطاء، ووجود القيم هنا ليس له أي تأثير على الإخراج. قد يكون أيضًا عدديًا فارغًا إذا لم يكن هناك اسم متاح.

السمات الاختيارية (انظر Attrs ):

  • context_sparse_types: قائمة بأنواع Ncontext_sparse؛ أنواع البيانات في كل ميزة سياقية موجودة في context_sparse_keys. يدعم ParseSingleSequenceExample حاليًا DT_FLOAT (FloatList)، وDT_INT64 (Int64List)، وDT_STRING (BytesList).
  • context_dense_shapes: قائمة بأشكال Ncontext_dense؛ أشكال البيانات في كل ميزة سياقية موجودة في context_dense_keys. يجب أن يكون عدد العناصر في الميزة المقابلة لـ context_dense_key[j] مساويًا دائمًا لـ context_dense_shapes[j].NumEntries(). سوف يتطابق شكل context_dense_values[j] مع context_dense_shapes[j].
  • feature_list_sparse_types: قائمة بأنواع Nfeature_list_sparse؛ أنواع البيانات الموجودة في كل قائمة ميزات موجودة في feature_list_sparse_keys. يدعم ParseSingleSequenceExample حاليًا DT_FLOAT (FloatList)، وDT_INT64 (Int64List)، وDT_STRING (BytesList).
  • feature_list_dense_shapes: قائمة بالأشكال Nfeature_list_dense؛ أشكال البيانات في كل قائمة ميزات موجودة في feature_list_dense_keys. يجب أن يكون شكل كل ميزة في قائمة الميزات المقابلة لـ feature_list_dense_key[j] مساويًا دائمًا لـ feature_list_dense_shapes[j].NumEntries().

عائدات:

  • OutputList context_sparse_indices
  • OutputList context_sparse_values
  • OutputList context_sparse_shapes
  • OutputList context_dense_values
  • OutputList feature_list_sparse_indices
  • OutputList feature_list_sparse_values
  • OutputList feature_list_sparse_shapes
  • OutputList feature_list_dense_values

البنائين والمدمرين

ParseSingleSequenceExample (const :: tensorflow::Scope & scope, :: tensorflow::Input serialized, :: tensorflow::Input feature_list_dense_missing_assumed_empty, :: tensorflow::InputList context_sparse_keys, :: tensorflow::InputList context_dense_keys, :: tensorflow::InputList feature_list_sparse_keys, :: tensorflow::InputList feature_list_dense_keys, :: tensorflow::InputList context_dense_defaults, :: tensorflow::Input debug_name)
ParseSingleSequenceExample (const :: tensorflow::Scope & scope, :: tensorflow::Input serialized, :: tensorflow::Input feature_list_dense_missing_assumed_empty, :: tensorflow::InputList context_sparse_keys, :: tensorflow::InputList context_dense_keys, :: tensorflow::InputList feature_list_sparse_keys, :: tensorflow::InputList feature_list_dense_keys, :: tensorflow::InputList context_dense_defaults, :: tensorflow::Input debug_name, const ParseSingleSequenceExample::Attrs & attrs)

الصفات العامة

context_dense_values
context_sparse_indices
context_sparse_shapes
context_sparse_values
feature_list_dense_values
feature_list_sparse_indices
feature_list_sparse_shapes
feature_list_sparse_values
operation

وظائف ثابتة العامة

ContextDenseShapes (const gtl::ArraySlice< PartialTensorShape > & x)
ContextSparseTypes (const DataTypeSlice & x)
FeatureListDenseShapes (const gtl::ArraySlice< PartialTensorShape > & x)
FeatureListDenseTypes (const DataTypeSlice & x)
FeatureListSparseTypes (const DataTypeSlice & x)

الهياكل

Tensorflow:: ops:: ParseSingleSequenceExample:: Attrs

محددات السمات الاختيارية لـ ParseSingleSequenceExample .

الصفات العامة

context_dense_values

::tensorflow::OutputList context_dense_values

context_sparse_indices

::tensorflow::OutputList context_sparse_indices

context_sparse_shapes

::tensorflow::OutputList context_sparse_shapes

context_sparse_values

::tensorflow::OutputList context_sparse_values

feature_list_dense_values

::tensorflow::OutputList feature_list_dense_values

feature_list_sparse_indices

::tensorflow::OutputList feature_list_sparse_indices

feature_list_sparse_shapes

::tensorflow::OutputList feature_list_sparse_shapes

feature_list_sparse_values

::tensorflow::OutputList feature_list_sparse_values

عملية

Operation operation

الوظائف العامة

مثال على ParseSingleSequence

 ParseSingleSequenceExample(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input serialized,
  ::tensorflow::Input feature_list_dense_missing_assumed_empty,
  ::tensorflow::InputList context_sparse_keys,
  ::tensorflow::InputList context_dense_keys,
  ::tensorflow::InputList feature_list_sparse_keys,
  ::tensorflow::InputList feature_list_dense_keys,
  ::tensorflow::InputList context_dense_defaults,
  ::tensorflow::Input debug_name
)

مثال على ParseSingleSequence

 ParseSingleSequenceExample(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input serialized,
  ::tensorflow::Input feature_list_dense_missing_assumed_empty,
  ::tensorflow::InputList context_sparse_keys,
  ::tensorflow::InputList context_dense_keys,
  ::tensorflow::InputList feature_list_sparse_keys,
  ::tensorflow::InputList feature_list_dense_keys,
  ::tensorflow::InputList context_dense_defaults,
  ::tensorflow::Input debug_name,
  const ParseSingleSequenceExample::Attrs & attrs
)

وظائف ثابتة العامة

ContextDenseShapes

Attrs ContextDenseShapes(
  const gtl::ArraySlice< PartialTensorShape > & x
)

أنواع السياق

Attrs ContextSparseTypes(
  const DataTypeSlice & x
)

قائمة المميزاتDenseShapes

Attrs FeatureListDenseShapes(
  const gtl::ArraySlice< PartialTensorShape > & x
)

FeaturesListDenseTypes

Attrs FeatureListDenseTypes(
  const DataTypeSlice & x
)

قائمة الميزاتSparseTypes

Attrs FeatureListSparseTypes(
  const DataTypeSlice & x
)