tensorflow :: ops :: MatrixDiag
#include <array_ops.h>
Verilen toplu çapraz değerlere sahip bir toplu çapraz tensör döndürür.
Özet
Bir Verilen diagonal
, bu işlem bir ile tensörünü döndüren diagonal
sıfır gelerek ve her şeyi. Köşegen şu şekilde hesaplanır:
Varsayalım diagonal
sahip k
boyutları [I, J, K, ..., N]
, daha sonra çıkış sıralaması bir tensör olan k+1
boyutları, [I, J, K, ..., N, N-] 'burada:
output[i, j, k, ..., m, n] = 1{m=n} * diagonal[i, j, k, ..., n]
.
Örneğin:
# 'diagonal' is [[1, 2, 3, 4], [5, 6, 7, 8]]
and diagonal.shape = (2, 4)
tf.matrix_diag(diagonal) ==> [[[1, 0, 0, 0] [0, 2, 0, 0] [0, 0, 3, 0] [0, 0, 0, 4]], [[5, 0, 0, 0] [0, 6, 0, 0] [0, 0, 7, 0] [0, 0, 0, 8]]]
which has shape (2, 4, 4)
Argümanlar:
- kapsam: Bir Scope nesnesi
- diyagonal: Derece
k
, buradak >= 1
.
İadeler:
-
Output
:output.shape = diagonal.shape + [diagonal.shape[-1]]
ileoutput.shape = diagonal.shape + [diagonal.shape[-1]]
k+1
.
Yapıcılar ve Yıkıcılar | |
---|---|
MatrixDiag (const :: tensorflow::Scope & scope, :: tensorflow::Input diagonal) |
Genel özellikler | |
---|---|
operation | |
output |
Kamusal işlevler | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
Genel özellikler
operasyon
Operation operation
çıktı
::tensorflow::Output output
Kamusal işlevler
MatrixDiag
MatrixDiag( const ::tensorflow::Scope & scope, ::tensorflow::Input diagonal )
düğüm
::tensorflow::Node * node() const
operator :: tensorflow :: Girdi
operator::tensorflow::Input() const
operator :: tensorflow :: Çıktı
operator::tensorflow::Output() const