tensorflow:: ops:: SparseCross
#include <sparse_ops.h>Generates sparse cross from a list of sparse and dense tensors.
まとめ
この操作は、2D SparseTensorと 2D Tensorの 2 つのリストを受け取ります。それぞれが、1 つの特徴列の特徴を表します。そして、これらの特徴のバッチごとのクロスを含む 2D SparseTensorを出力します。
For example, if the inputs are
inputs[0]: SparseTensor with shape = [2, 2] [0, 0]: "a" [1, 0]: "b" [1, 1]: "c" inputs[1]: SparseTensor with shape = [2, 1] [0, 0]: "d" [1, 0]: "e" inputs[2]: Tensor [["f"], ["g"]]
then the output will be
shape = [2, 2] [0, 0]: "a_X_d_X_f" [1, 0]: "b_X_e_X_g" [1, 1]: "c_X_e_X_g"
if hashed_output=true then the output will be
shape = [2, 2]
[0, 0]: FingerprintCat64(
Fingerprint64("f"), FingerprintCat64(
Fingerprint64("d"), Fingerprint64("a")))
[1, 0]: FingerprintCat64(
Fingerprint64("g"), FingerprintCat64(
Fingerprint64("e"), Fingerprint64("b")))
[1, 1]: FingerprintCat64(
Fingerprint64("g"), FingerprintCat64(
Fingerprint64("e"), Fingerprint64("c")))議論:
- スコープ:スコープオブジェクト
- indices: 2-D. Indices of each input
SparseTensor. - values: 1-D. values of each
SparseTensor. - shapes: 1-D. Shapes of each
SparseTensor. - dense_inputs: 2-D. Columns represented by dense
Tensor. - hashed_output: If true, returns the hash of the cross instead of the string. This will allow us avoiding string manipulations.
- num_buckets: It is used if hashed_output is true. output = hashed_valuenum_buckets if num_buckets > 0 else hashed_value.
- hash_key: Specify the hash_key that will be used by the
FingerprintCat64function to combine the crosses fingerprints.
返品:
-
Outputoutput_indices: 2-D. Indices of the concatenatedSparseTensor. -
Outputoutput_values: 1-D. Non-empty values of the concatenated or hashedSparseTensor. -
Outputoutput_shape: 1-D. Shape of the concatenatedSparseTensor.
構築者と破壊者 | |
|---|---|
SparseCross (const :: tensorflow::Scope & scope, :: tensorflow::InputList indices, :: tensorflow::InputList values, :: tensorflow::InputList shapes, :: tensorflow::InputList dense_inputs, bool hashed_output, int64 num_buckets, int64 hash_key, DataType out_type, DataType internal_type) |
公開属性 | |
|---|---|
operation | |
output_indices | |
output_shape | |
output_values | |
公開属性
手術
Operation operation
output_indices
::tensorflow::Output output_indices
output_shape
::tensorflow::Output output_shape
output_values
::tensorflow::Output output_values
公的機能
SparseCross
SparseCross( const ::tensorflow::Scope & scope, ::tensorflow::InputList indices, ::tensorflow::InputList values, ::tensorflow::InputList shapes, ::tensorflow::InputList dense_inputs, bool hashed_output, int64 num_buckets, int64 hash_key, DataType out_type, DataType internal_type )