tensorflow:: ops:: SparseReshape
#include <sparse_ops.h>SparseTensorを再構成して、値を新しい密な形状で表現します。
まとめ
この操作は、表現された密なテンソルに対する reshape と同じ意味を持ちます。input_indices input_indices 、要求されたnew_shapeに基づいて再計算されます。
new_shapeのいずれかの要素が特殊値 -1 の場合、その次元のサイズは、全体の密行列のサイズが一定になるように計算されます。new_shape の要素で -1 になるのは最大で 1 つですnew_shapeによって示される密new_shape要素の数は、 input_shapeによって元々示されていた密行列要素の数と同じでなければなりません。
形状変更は、SparseTensor内の値の順序には影響しません。
入力テンソルのランクがR_inで、 N個の空でない値があり、 new_shape長さがR_outの場合、 input_indices形状は[N, R_in] 、 input_shape長さはR_in 、 output_indices形状は[N, R_out] 、 output_shape長さはR_outとなります。
議論:
- スコープ:スコープオブジェクト
- input_indices: 2次元。SparseTensor内の空でない値のインデックスを含む
N x R_in行列。 - input_shape: 1次元。入力SparseTensorの密な形状を持つ
R_inベクトル。 - new_shape: 1次元。要求された新しい密な形状を持つ
R_outベクトル。
返品:
-
Outputoutput_indices: 2 次元。出力 SparseTensor 内の空でない値の更新されたインデックスを含むN x R_out行列。 -
Outputoutput_shape: 1次元。出力SparseTensorの完全な密な形状を持つR_outベクトル。これはnew_shapeと同じですが、-1次元が埋められています。
コンストラクターとデストラクタ | |
|---|---|
SparseReshape (const :: tensorflow::Scope & scope, :: tensorflow::Input input_indices, :: tensorflow::Input input_shape, :: tensorflow::Input new_shape) |
公開属性 | |
|---|---|
operation | |
output_indices | |
output_shape | |
公開属性
手術
Operation operation
出力インデックス
::tensorflow::Output output_indices
出力形状
::tensorflow::Output output_shape
公的機能
スパースリシェイプ
SparseReshape( const ::tensorflow::Scope & scope, ::tensorflow::Input input_indices, ::tensorflow::Input input_shape, ::tensorflow::Input new_shape )