tensorflow:: ops:: SparseCrossHashed
#include <sparse_ops.h>疎テンソルと密テンソルのリストから疎クロスを生成します。
まとめ
この操作は、2D SparseTensorと 2D Tensorの 2 つのリストを受け取ります。それぞれが、1 つの特徴列の特徴を表します。そして、これらの特徴のバッチごとのクロスを含む 2D SparseTensorを出力します。
例えば、入力が
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"]]
すると出力は次のようになります
shape = [2, 2] [0, 0]: "a_X_d_X_f" [1, 0]: "b_X_e_X_g" [1, 1]: "c_X_e_X_g"
hasched_output=true の場合、出力は次のようになります。
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")))議論:
- スコープ:スコープオブジェクト
- インデックス: 2-D。各入力
SparseTensorのインデックス。 - 値: 各
SparseTensorの 1 次元の値。 - 形状: 1次元。各
SparseTensorの形状。 - dense_inputs: 2次元。密な
Tensorで表現される列。 - num_buckets: hashed_output が true の場合に使用されます。 output = hashed_valuenum_buckets if num_buckets > 0 else hashed_value。
- strong_hash: ブール値。true の場合、farmhash の代わりにソルト付きの siphash が使用されます。
- salt: siphash関数で使用するソルトを指定します。
返品:
-
Outputoutput_indices: 2次元。連結されたSparseTensorのインデックス。 -
Outputoutput_values: 1次元。連結またはハッシュ化されたSparseTensorの空でない値。 -
Outputoutput_shape: 1次元。連結されたSparseTensorの形状。
コンストラクターとデストラクタ | |
|---|---|
SparseCrossHashed (const :: tensorflow::Scope & scope, :: tensorflow::InputList indices, :: tensorflow::InputList values, :: tensorflow::InputList shapes, :: tensorflow::InputList dense_inputs, :: tensorflow::Input num_buckets, :: tensorflow::Input strong_hash, :: tensorflow::Input salt) |
公開属性 | |
|---|---|
operation | |
output_indices | |
output_shape | |
output_values | |
公開属性
手術
Operation operation
出力インデックス
::tensorflow::Output output_indices
出力形状
::tensorflow::Output output_shape
出力値
::tensorflow::Output output_values
公的機能
スパースクロスハッシュ
SparseCrossHashed( const ::tensorflow::Scope & scope, ::tensorflow::InputList indices, ::tensorflow::InputList values, ::tensorflow::InputList shapes, ::tensorflow::InputList dense_inputs, ::tensorflow::Input num_buckets, ::tensorflow::Input strong_hash, ::tensorflow::Input salt )