tensorflow::ops::ParseSequenceExample
#include <parsing_ops.h>Chuyển đổi một vectơ các proto brain.SequenceExample (dưới dạng chuỗi) thành các tensor có kiểu dữ liệu.
Bản tóm tắt
Luận điểm:
- phạm vi: Một đối tượng Phạm vi
- serialized: Một vectơ chứa các proto SequenceExample được tuần tự hóa nhị phân.
- debug_name: Một vectơ chứa tên của các proto đã được tuần tự hóa. Ví dụ, có thể chứa tên khóa bảng (mô tả) cho proto đã được tuần tự hóa tương ứng. Điều này chỉ 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 vectơ rỗng nếu không có tên nào được cung cấp.
- context_dense_defaults: Một danh sách các Tensor 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ì Feature 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, hình dạng của nó phải khớp với context_dense_shapes[j].
- feature_list_dense_missing_assumed_empty: Một vectơ liệt kê các khóa FeatureList có thể bị thiếu trong SequenceExamples. Nếu FeatureList liên kết bị thiếu, nó được coi là trống. Theo mặc định, bất kỳ FeatureList nào không được liệt kê trong vectơ này đều phải tồn tại trong SequenceExamples.
- context_sparse_keys: Một danh sách các Tensor chuỗi Ncontext_sparse (vô hướng). Các khóa được mong đợi trong các tính năng của Ví dụ liên kết với các giá trị context_sparse.
- context_dense_keys: Một danh sách các Tensor chuỗi Ncontext_dense (vô hướng). Các khóa được mong đợi trong các đặc trưng ngữ cảnh của SequenceExamples liên kết với các giá trị dày đặc.
- feature_list_sparse_keys: Một danh sách gồm Nfeature_list_sparse string Tensor (giá trị vô hướng). Đây là các khóa dự kiến trong FeatureLists liên kết với các giá trị thưa.
- feature_list_dense_keys: Một danh sách các Tensor chuỗi Nfeature_list_dense (vô hướng). Các khóa được mong đợi trong feature_lists của SequenceExamples liên kết với các danh sách giá trị dày đặc.
Các thuộc tính tùy chọn (xem Attrs ):
- context_sparse_types: Một danh sách gồm Ncontext_sparse_types; các kiểu dữ liệu trong mỗi ngữ cảnh Feature được cung cấp trong context_sparse_keys. Hiện tại, ParseSingleSequenceExample hỗ trợ DT_FLOAT (FloatList), DT_INT64 (Int64List) và DT_STRING (BytesList).
- context_dense_shapes: Một danh sách Ncontext_dense shapes; hình dạng của dữ liệu trong mỗi Đặc trưng ngữ cảnh được cung cấp trong context_dense_keys. Số lượng phần tử trong Đặc trư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: Một danh sách gồm N feature_list_sparse types; 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_dense_shapes: Một danh sách gồm Nfeature_list_dense_shapes; 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 mỗi Feature 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ề:
-
OutputListcontext_sparse_indices -
OutputListcontext_sparse_values -
OutputListcontext_sparse_shapes -
OutputListcontext_dense_values -
OutputListfeature_list_sparse_indices -
OutputListfeature_list_sparse_values -
OutputListfeature_list_sparse_shapes -
OutputListfeature_list_dense_values -
OutputListfeature_list_dense_lengths
Hàm khởi tạo và hàm hủy | |
|---|---|
ParseSequenceExample (const :: tensorflow::Scope & scope, :: tensorflow::Input serialized, :: tensorflow::Input debug_name, :: tensorflow::InputList context_dense_defaults, const gtl::ArraySlice<::tensorflow::tstring > & feature_list_dense_missing_assumed_empty, const gtl::ArraySlice<::tensorflow::tstring > & context_sparse_keys, const gtl::ArraySlice<::tensorflow::tstring > & context_dense_keys, const gtl::ArraySlice<::tensorflow::tstring > & feature_list_sparse_keys, const gtl::ArraySlice<::tensorflow::tstring > & feature_list_dense_keys) | |
ParseSequenceExample (const :: tensorflow::Scope & scope, :: tensorflow::Input serialized, :: tensorflow::Input debug_name, :: tensorflow::InputList context_dense_defaults, const gtl::ArraySlice<::tensorflow::tstring > & feature_list_dense_missing_assumed_empty, const gtl::ArraySlice<::tensorflow::tstring > & context_sparse_keys, const gtl::ArraySlice<::tensorflow::tstring > & context_dense_keys, const gtl::ArraySlice<::tensorflow::tstring > & feature_list_sparse_keys, const gtl::ArraySlice<::tensorflow::tstring > & feature_list_dense_keys, const ParseSequenceExample::Attrs & attrs) |
Các hàm tĩnh công khai | |
|---|---|
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) | |
Cấu trúc | |
|---|---|
| tensorflow::ops::ParseSequenceExample::Attrs | Các phương thức thiết lập thuộc tính tùy chọn cho ParseSequenceExample . |
Thuộc tính công khai
context_dense_values
::tensorflow::OutputList context_dense_values
context_sparse_indices
::tensorflow::OutputList context_sparse_indices
hình dạng thưa thớt ngữ cảnh
::tensorflow::OutputList context_sparse_shapes
context_sparse_values
::tensorflow::OutputList context_sparse_values
độ dài danh sách tính năng dày đặc
::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
danh sách tính năng hình dạng thưa thớt
::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
Ví dụ về chuỗi phân tích cú pháp
ParseSequenceExample( const ::tensorflow::Scope & scope, ::tensorflow::Input serialized, ::tensorflow::Input debug_name, ::tensorflow::InputList context_dense_defaults, const gtl::ArraySlice<::tensorflow::tstring > & feature_list_dense_missing_assumed_empty, const gtl::ArraySlice<::tensorflow::tstring > & context_sparse_keys, const gtl::ArraySlice<::tensorflow::tstring > & context_dense_keys, const gtl::ArraySlice<::tensorflow::tstring > & feature_list_sparse_keys, const gtl::ArraySlice<::tensorflow::tstring > & feature_list_dense_keys )
Ví dụ về chuỗi phân tích cú pháp
ParseSequenceExample( const ::tensorflow::Scope & scope, ::tensorflow::Input serialized, ::tensorflow::Input debug_name, ::tensorflow::InputList context_dense_defaults, const gtl::ArraySlice<::tensorflow::tstring > & feature_list_dense_missing_assumed_empty, const gtl::ArraySlice<::tensorflow::tstring > & context_sparse_keys, const gtl::ArraySlice<::tensorflow::tstring > & context_dense_keys, const gtl::ArraySlice<::tensorflow::tstring > & feature_list_sparse_keys, const gtl::ArraySlice<::tensorflow::tstring > & feature_list_dense_keys, const ParseSequenceExample::Attrs & attrs )
Các hàm tĩnh công khai
ContextDenseShapes
Attrs ContextDenseShapes( const gtl::ArraySlice< PartialTensorShape > & x )
ContextSparseTypes
Attrs ContextSparseTypes( const DataTypeSlice & x )
Danh sách tính năng Hình dạng dày đặc
Attrs FeatureListDenseShapes( const gtl::ArraySlice< PartialTensorShape > & x )
FeatureListDenseTypes
Attrs FeatureListDenseTypes( const DataTypeSlice & x )
FeatureListSparseTypes
Attrs FeatureListSparseTypes( const DataTypeSlice & x )
NcontextDense
Attrs NcontextDense( int64 x )
NcontextSparse
Attrs NcontextSparse( int64 x )
NfeatureListDense
Attrs NfeatureListDense( int64 x )
NfeatureListSparse
Attrs NfeatureListSparse( int64 x )