aliran tensor:: operasi:: Contoh ParseSequence

#include <parsing_ops.h>

Mengubah vektor proto brain.SequenceExample (sebagai string) menjadi tensor yang diketik.

Ringkasan

Argumen:

  • ruang lingkup: Objek Lingkup
  • berseri: Sebuah vektor yang berisi proto SequenceExample berseri biner.
  • debug_name: Vektor yang berisi nama-nama proto serial. Mungkin berisi, misalnya, nama kunci tabel (deskriptif) untuk proto serial yang sesuai. Ini murni berguna untuk tujuan debugging, dan keberadaan nilai di sini tidak berpengaruh pada output. Mungkin juga berupa vektor kosong jika tidak ada nama yang tersedia.
  • konteks_dense_defaults: Daftar Tensor Ncontext_dense (beberapa mungkin kosong). konteks_dense_defaults[j] memberikan nilai default ketika peta konteks SequenceExample tidak memiliki konteks_dense_key[j]. Jika Tensor kosong disediakan untuk konteks_dense_defaults[j], maka Fitur konteks_dense_keys[j] diperlukan. Jenis masukan disimpulkan dari konteks_dense_defaults[j], meskipun kosong. Jika Context_dense_defaults[j] tidak kosong, maka bentuknya harus sesuai dengan Context_dense_shapes[j].
  • feature_list_dense_missing_assumed_empty: Sebuah vektor yang mencantumkan kunci FeatureList yang mungkin hilang dari SequenceExamples. Jika FeatureList terkait tidak ada, maka dianggap kosong. Secara default, FeatureList apa pun yang tidak tercantum dalam vektor ini harus ada di SequenceExamples.
  • konteks_sparse_keys: Daftar Tensor string Ncontext_sparse (skalar). Kunci yang diharapkan dalam fitur Contoh terkait dengan nilai konteks_sparse.
  • konteks_dense_keys: Daftar Tensor string Ncontext_dense (skalar). Kunci yang diharapkan dalam fitur konteks SequenceExamples terkait dengan nilai padat.
  • feature_list_sparse_keys: Daftar Tensor string Nfeature_list_sparse (skalar). Kunci yang diharapkan dalam FeatureLists terkait dengan nilai renggang.
  • feature_list_dense_keys: Daftar Tensor string Nfeature_list_dense (skalar). Kunci yang diharapkan dalam feature_lists SequenceExamples terkait dengan daftar nilai padat.

Atribut opsional (lihat Attrs ):

  • context_sparse_types: Daftar tipe Ncontext_sparse; tipe data data di setiap konteks Fitur yang diberikan dalam konteks_sparse_keys. Saat ini ParseSingleSequenceExample mendukung DT_FLOAT (FloatList), DT_INT64 (Int64List), dan DT_STRING (BytesList).
  • context_dense_shapes: Daftar bentuk Ncontext_dense; bentuk data di setiap konteks Fitur yang diberikan dalam konteks_dense_keys. Jumlah elemen dalam Fitur yang terkait dengan Context_dense_key[j] harus selalu sama dengan Context_dense_shapes[j].NumEntries(). Bentuk dari Context_dense_values[j] akan cocok dengan Context_dense_shapes[j].
  • feature_list_sparse_types: Daftar tipe Nfeature_list_sparse; tipe data data di setiap FeatureList yang diberikan di feature_list_sparse_keys. Saat ini ParseSingleSequenceExample mendukung DT_FLOAT (FloatList), DT_INT64 (Int64List), dan DT_STRING (BytesList).
  • feature_list_dense_shapes: Daftar bentuk Nfeature_list_dense; bentuk data di setiap FeatureList yang diberikan di feature_list_dense_keys. Bentuk setiap Fitur di FeatureList yang terkait dengan feature_list_dense_key[j] harus selalu sama dengan feature_list_dense_shapes[j].NumEntries().

Pengembalian:

  • OutputList Keluarancontext_sparse_indices
  • OutputList konteks_nilai_jarang
  • OutputList Keluarancontext_sparse_shapes
  • OutputList konteks_padat_nilai
  • OutputList feature_list_sparse_indices
  • OutputList feature_list_sparse_values
  • OutputList feature_list_sparse_shapes
  • OutputList feature_list_dense_values
  • OutputList feature_list_dense_lengths

Konstruktor dan Destruktor

ParseSequenceExample (const :: tensorflow::Scope & scope, :: tensorflow::Input serialized, :: tensorflow::Input debug_name, :: tensorflow::InputList context_dense_defaults, const gtl::ArraySlice< string > & feature_list_dense_missing_assumed_empty, const gtl::ArraySlice< string > & context_sparse_keys, const gtl::ArraySlice< string > & context_dense_keys, const gtl::ArraySlice< string > & feature_list_sparse_keys, const gtl::ArraySlice< string > & feature_list_dense_keys)
ParseSequenceExample (const :: tensorflow::Scope & scope, :: tensorflow::Input serialized, :: tensorflow::Input debug_name, :: tensorflow::InputList context_dense_defaults, const gtl::ArraySlice< string > & feature_list_dense_missing_assumed_empty, const gtl::ArraySlice< string > & context_sparse_keys, const gtl::ArraySlice< string > & context_dense_keys, const gtl::ArraySlice< string > & feature_list_sparse_keys, const gtl::ArraySlice< string > & feature_list_dense_keys, const ParseSequenceExample::Attrs & attrs)

Atribut publik

context_dense_values
context_sparse_indices
context_sparse_shapes
context_sparse_values
feature_list_dense_lengths
feature_list_dense_values
feature_list_sparse_indices
feature_list_sparse_shapes
feature_list_sparse_values
operation

Fungsi statis publik

ContextDenseShapes (const gtl::ArraySlice< PartialTensorShape > & x)
ContextSparseTypes (const DataTypeSlice & x)
FeatureListDenseShapes (const gtl::ArraySlice< PartialTensorShape > & x)
FeatureListDenseTypes (const DataTypeSlice & x)
FeatureListSparseTypes (const DataTypeSlice & x)
NcontextDense (int64 x)
NcontextSparse (int64 x)
NfeatureListDense (int64 x)
NfeatureListSparse (int64 x)

Struktur

tensorflow:: ops:: ParseSequenceContoh:: Attrs

Penyetel atribut opsional untuk ParseSequenceExample .

Atribut publik

konteks_nilai_padat

::tensorflow::OutputList context_dense_values

konteks_jarang_indeks

::tensorflow::OutputList context_sparse_indices

konteks_jarang_bentuk

::tensorflow::OutputList context_sparse_shapes

konteks_nilai_jarang

::tensorflow::OutputList context_sparse_values

feature_list_dense_lengths

::tensorflow::OutputList feature_list_dense_lengths

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

operasi

Operation operation

Fungsi publik

Contoh ParseSequence

 ParseSequenceExample(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input serialized,
  ::tensorflow::Input debug_name,
  ::tensorflow::InputList context_dense_defaults,
  const gtl::ArraySlice< string > & feature_list_dense_missing_assumed_empty,
  const gtl::ArraySlice< string > & context_sparse_keys,
  const gtl::ArraySlice< string > & context_dense_keys,
  const gtl::ArraySlice< string > & feature_list_sparse_keys,
  const gtl::ArraySlice< string > & feature_list_dense_keys
)

Contoh ParseSequence

 ParseSequenceExample(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input serialized,
  ::tensorflow::Input debug_name,
  ::tensorflow::InputList context_dense_defaults,
  const gtl::ArraySlice< string > & feature_list_dense_missing_assumed_empty,
  const gtl::ArraySlice< string > & context_sparse_keys,
  const gtl::ArraySlice< string > & context_dense_keys,
  const gtl::ArraySlice< string > & feature_list_sparse_keys,
  const gtl::ArraySlice< string > & feature_list_dense_keys,
  const ParseSequenceExample::Attrs & attrs
)

Fungsi statis publik

KonteksPadatBentuk

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

KonteksSparseType

Attrs ContextSparseTypes(
  const DataTypeSlice & x
)

Daftar FiturDenseShapes

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

Daftar FiturDenseTypes

Attrs FeatureListDenseTypes(
  const DataTypeSlice & x
)

FeatureListSparseTypes

Attrs FeatureListSparseTypes(
  const DataTypeSlice & x
)

NkonteksPadat

Attrs NcontextDense(
  int64 x
)

NkonteksJarang

Attrs NcontextSparse(
  int64 x
)

NfeatureListDense

Attrs NfeatureListDense(
  int64 x
)

NfeatureListSparse

Attrs NfeatureListSparse(
  int64 x
)