テンソルフロー::作戦::スパースクロスV2
#include <sparse_ops.h>スパースおよびデンステンソルのリストからスパースクロスを生成します。
まとめ
この操作は 2 つのリスト (2D SparseTensorの 1 つと 2D Tensorの 1 つ) を受け取り、それぞれが 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"
hashed_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のインデックス。 - 値: 1-D。各
SparseTensorの値。 - 形状: 1-D。各
SparseTensorの形状。 - 密入力: 2 次元。密な
Tensorで表される列。 - sep: 文字列入力のリストを結合するときに使用される文字列。後で区切り文字として使用できます。
戻り値:
-
Outputoutput_indices: 2-D。連結されたSparseTensorのインデックス。 -
Output出力値: 1-D。連結またはハッシュされたSparseTensorの空でない値。 -
Output出力形状: 1-D。連結されたSparseTensorの形状。
コンストラクターとデストラクター | |
|---|---|
SparseCrossV2 (const :: tensorflow::Scope & scope, :: tensorflow::InputList indices, :: tensorflow::InputList values, :: tensorflow::InputList shapes, :: tensorflow::InputList dense_inputs, :: tensorflow::Input sep) |
パブリック属性 | |
|---|---|
operation | |
output_indices | |
output_shape | |
output_values | |
パブリック属性
手術
Operation operation
出力インデックス
::tensorflow::Output output_indices
出力形状
::tensorflow::Output output_shape
出力値
::tensorflow::Output output_values
公共機能
スパースクロスV2
SparseCrossV2( const ::tensorflow::Scope & scope, ::tensorflow::InputList indices, ::tensorflow::InputList values, ::tensorflow::InputList shapes, ::tensorflow::InputList dense_inputs, ::tensorflow::Input sep )