tensorflow :: ops :: MatrixBandPart
#include <array_ops.h>
가장 안쪽의 각 행렬에서 중앙 밴드 외부의 모든 것을 설정하는 텐서를 복사합니다.
요약
0으로.
band
부분은 다음과 같이 계산됩니다. input
에 k
차원 [I, J, K, ..., M, N]
이 있다고 가정하면 출력은 동일한 모양의 텐서입니다.
band[i, j, k, ..., m, n] = in_band(m, n) * input[i, j, k, ..., m, n]
.
표시기 기능
in_band(m, n) = (num_lower < 0 || (mn) <= num_lower)) && (num_upper < 0 || (nm) <= num_upper)
.
예를 들면 :
# if 'input' is [[ 0, 1, 2, 3] [-1, 0, 1, 2] [-2, -1, 0, 1] [-3, -2, -1, 0]],
tf.matrix_band_part(input, 1, -1) ==> [[ 0, 1, 2, 3] [-1, 0, 1, 2] [ 0, -1, 0, 1] [ 0, 0, -1, 0]],
tf.matrix_band_part(input, 2, 1) ==> [[ 0, 1, 0, 0] [-1, 0, 1, 0] [-2, -1, 0, 1] [ 0, -2, -1, 0]]
유용한 특수 사례 :
tf.matrix_band_part(input, 0, -1) ==> Upper triangular part. tf.matrix_band_part(input, -1, 0) ==> Lower triangular part. tf.matrix_band_part(input, 0, 0) ==> Diagonal.
인수 :
- 범위 : 범위 개체
- 입력 : 순위
k
텐서. - num_lower : 0-D 텐서. 유지할 부 대각선의 수입니다. 음수이면 전체 아래쪽 삼각형을 유지합니다.
- num_upper : 0-D 텐서. 유지할 초 대각선의 수입니다. 음수이면 전체 위쪽 삼각형을 유지합니다.
보고:
-
Output
: 입력과 같은 모양의k
텐서 순위. 추출 된 줄무늬 텐서입니다.
생성자와 소멸자 | |
---|---|
MatrixBandPart (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input num_lower, :: tensorflow::Input num_upper) |
공용 속성 | |
---|---|
band | |
operation |
공공 기능 | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
공용 속성
밴드
::tensorflow::Output band
조작
Operation operation
공공 기능
MatrixBandPart
MatrixBandPart( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input num_lower, ::tensorflow::Input num_upper )
마디
::tensorflow::Node * node() const
연산자 :: tensorflow :: 입력
operator::tensorflow::Input() const
연산자 :: tensorflow :: 출력
operator::tensorflow::Output() const