dòng chảy căng:: ôi:: ParseSequenceVí dụV2

#include <parsing_ops.h>

Chuyển đổi một vectơ của các proto tf.io.SequenceExample (dưới dạng chuỗi) thành các tensor đã nhập.

Bản tóm tắt

Tranh luận:

  • phạm vi: Một đối tượng Phạm vi
  • được tuần tự hóa: Một đại lượng vô hướng hoặc vectơ chứa các nguyên mẫu SequenceExample được tuần tự hóa nhị phân.
  • debug_name: Một đại lượng vô hướng hoặc vectơ chứa tên của các proto được tuần tự hóa. Có thể chứa, ví dụ, tên khóa bảng (mô tả) cho nguyên mẫu được xê-ri hóa tương ứng. Điều này hoàn toàn hữu ích cho mục đích gỡ lỗi và sự hiện diện của các giá trị ở đây không ảnh hưởng đến đầu ra. Cũng có thể là một vector trống nếu không có tên.
  • context_sparse_keys: Các khóa dự kiến ​​trong các tính năng của Ví dụ được liên kết với các giá trị context_sparse.
  • context_dense_keys: Các khóa dự kiến ​​trong các tính năng ngữ cảnh của SequenceExamples được liên kết với các giá trị dày đặc.
  • context_ragged_keys: Các khóa dự kiến ​​trong các tính năng của Ví dụ được liên kết với các giá trị context_ragged.
  • feature_list_sparse_keys: Các khóa dự kiến ​​trong FeatureLists được liên kết với các giá trị thưa thớt.
  • feature_list_dense_keys: Các khóa dự kiến ​​trong feature_lists của SequenceExamples được liên kết với danh sách các giá trị dày đặc.
  • feature_list_ragged_keys: Các khóa dự kiến ​​trong FeatureLists được liên kết với các giá trị rời rạc.
  • feature_list_dense_missing_assumed_empty: Một vectơ tương ứng với tỷ lệ 1:1 với featue_list_dense_keys, cho biết những tính năng nào có thể bị thiếu trong SequenceExamples. Nếu Danh sách tính năng liên quan bị thiếu, nó sẽ được coi là trống.
  • context_dense_defaults: Danh sách các Tenxơ Ncontext_dense (một số có thể trống). context_dense_defaults[j] cung cấp các giá trị mặc định khi bản đồ ngữ cảnh của SequenceExample thiếu context_dense_key[j]. Nếu một Tensor trống được cung cấp cho context_dense_defaults[j] thì tính năng context_dense_keys[j] là bắt buộc. Loại đầu vào được suy ra từ context_dense_defaults[j], ngay cả khi nó trống. Nếu context_dense_defaults[j] không trống thì hình dạng của nó phải khớp với context_dense_shapes[j].

Thuộc tính tùy chọn (xem Attrs ):

  • context_sparse_types: Danh sách các loại Ncontext_sparse; các kiểu dữ liệu của dữ liệu trong từng ngữ cảnh Tính năng được đưa ra trong context_sparse_keys. Hiện tại ParseSingleSequenceExample hỗ trợ DT_FLOAT (FloatList), DT_INT64 (Int64List) và DT_STRING (BytesList).
  • context_ragged_value_types: Các kiểu dữ liệu RaggedTensor.value cho các tính năng ngữ cảnh rời rạc.
  • context_ragged_split_types: RaggedTensor.row_split dtypes dành cho các tính năng ngữ cảnh rời rạc.
  • context_dense_shapes: Danh sách các hình dạng Ncontext_dense; hình dạng của dữ liệu trong từng ngữ cảnh Tính năng được đưa ra trong context_dense_keys. Số phần tử trong Đối tượng tương ứng với context_dense_key[j] phải luôn bằng context_dense_shapes[j].NumEntries(). Hình dạng của context_dense_values[j] sẽ khớp với context_dense_shapes[j].
  • feature_list_sparse_types: Danh sách các loại Nfeature_list_sparse; các kiểu dữ liệu của dữ liệu trong mỗi FeatureList được cung cấp trong feature_list_sparse_keys. Hiện tại ParseSingleSequenceExample hỗ trợ DT_FLOAT (FloatList), DT_INT64 (Int64List) và DT_STRING (BytesList).
  • feature_list_ragged_value_types: Các loại dtype RaggedTensor.value cho các tính năng FeatureList bị rách.
  • feature_list_ragged_split_types: Các dtype RaggedTensor.row_split dành cho các tính năng FeatureList bị rách.
  • feature_list_dense_shapes: Danh sách các hình dạng Nfeature_list_dense; hình dạng của dữ liệu trong mỗi FeatureList được cung cấp trong feature_list_dense_keys. Hình dạng của từng Tính năng trong FeatureList tương ứng với feature_list_dense_key[j] phải luôn bằng feature_list_dense_shapes[j].NumEntries().

Trả về:

  • OutputList cảnh_sparse_indices
  • OutputList cảnh_sparse_values
  • OutputList bối cảnh_sparse_shapes
  • OutputList context_dense_values
  • OutputList cảnh_ragged_values
  • OutputList bối cảnh_ragged_row_splits
  • 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
  • OutputList feature_list_ragged_values
  • OutputList feature_list_ragged_outer_splits
  • OutputList feature_list_ragged_inner_splits

Hàm tạo và hàm hủy

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

Thuộc tính công khai

context_dense_values
context_ragged_row_splits
context_ragged_values
context_sparse_indices
context_sparse_shapes
context_sparse_values
feature_list_dense_lengths
feature_list_dense_values
feature_list_ragged_inner_splits
feature_list_ragged_outer_splits
feature_list_ragged_values
feature_list_sparse_indices
feature_list_sparse_shapes
feature_list_sparse_values
operation

Các hàm tĩnh công khai

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

Cấu trúc

tenorflow:: ops:: ParseSequenceExampleV2:: Attrs

Trình thiết lập thuộc tính tùy chọn cho ParseSequenceExampleV2 .

Thuộc tính công khai

bối cảnh_dense_values

::tensorflow::OutputList context_dense_values

bối cảnh_ragged_row_splits

::tensorflow::OutputList context_ragged_row_splits

bối cảnh_ragged_values

::tensorflow::OutputList context_ragged_values

bối cảnh_sparse_indices

::tensorflow::OutputList context_sparse_indices

bối cảnh_sparse_shapes

::tensorflow::OutputList context_sparse_shapes

bối cảnh_sparse_values

::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_ragged_inner_splits

::tensorflow::OutputList feature_list_ragged_inner_splits

feature_list_ragged_outer_splits

::tensorflow::OutputList feature_list_ragged_outer_splits

feature_list_ragged_values

::tensorflow::OutputList feature_list_ragged_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

hoạt động

Operation operation

Chức năng công cộng

ParseSequenceVí dụV2

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

ParseSequenceVí dụV2

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

Các hàm tĩnh công khai

Bối cảnhDày đặcHình dạng

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

Bối cảnhRaggedSplitTypes

Attrs ContextRaggedSplitTypes(
  const DataTypeSlice & x
)

Bối cảnhRaggedValueTypes

Attrs ContextRaggedValueTypes(
  const DataTypeSlice & x
)

Bối cảnhCác loại thưa thớt

Attrs ContextSparseTypes(
  const DataTypeSlice & x
)

Danh sách tính năngDenseShapes

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

Danh sách tính năngDenseTypes

Attrs FeatureListDenseTypes(
  const DataTypeSlice & x
)

FeatureListRaggedSplitTypes

Attrs FeatureListRaggedSplitTypes(
  const DataTypeSlice & x
)

FeatureListRaggedValueTypes

Attrs FeatureListRaggedValueTypes(
  const DataTypeSlice & x
)

Danh sách tính năngSparseTypes

Attrs FeatureListSparseTypes(
  const DataTypeSlice & x
)

NcontextThưa thớt

Attrs NcontextSparse(
  int64 x
)

NfeatureListDense

Attrs NfeatureListDense(
  int64 x
)

NfeatureListThưa thớt

Attrs NfeatureListSparse(
  int64 x
)