tensorflow :: ops :: BatchToSpace
#include <array_ops.h>
T 유형의 4 차원 텐서 용 BatchToSpace
요약
이것은보다 일반적인 BatchToSpaceND 의 레거시 버전입니다.
데이터를 배치에서 공간 데이터 블록으로 재정렬 (순열) 한 다음 잘라냅니다. 이것은 SpaceToBatch의 역변환입니다. 구체적으로는,이 연산은 입력의 값 텐서의 카피 출력 batch
치수는 공간을 블록으로 이동 height
및 width
치수는 다음에 따라 잘라내어 height
및 width
치수.
인수 :
- 범위 : 범위 개체
- 입력 :
[batch*block_size*block_size, height_pad/block_size, width_pad/block_size, depth]
모양의 4 차원 텐서. 입력 텐서의 배치 크기는block_size * block_size
로 나눌 수 있어야합니다. - crops : 모양이
[2, 2]
인 음이 아닌 정수의 2 차원 텐서. 다음과 같이 공간 차원에 걸쳐 중간 결과에서 잘라낼 요소 수를 지정합니다.crops = [[crop_top, crop_bottom], [crop_left, crop_right]]
보고:
-
Output
: 4-D 모양[batch, height, width, depth]
, 여기서 :height = height_pad - crop_top - crop_bottom width = width_pad - crop_left - crop_right
attr block_size
는 1보다 커야합니다. 블록 크기를 나타냅니다.
몇 가지 예 :
(1) 다음과 같은 형태 [4, 1, 1, 1]
및 block_size 2를 입력하는 경우 :
[[[[1]]], [[[2]]], [[[3]]], [[[4]]]]
출력 텐서는 모양 [1, 2, 2, 1]
및 값 :
x = [[[[1], [2]], [[3], [4]]]]
(2) 다음과 같은 형태 [4, 1, 1, 3]
및 block_size 2를 입력하는 경우 :
[[[[1, 2, 3]]], [[[4, 5, 6]]], [[[7, 8, 9]]], [[[10, 11, 12]]]]
출력 텐서는 모양 [1, 2, 2, 3]
및 값 :
x = [[[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]]]
(3) 다음과 같은 모양 [4, 2, 2, 1]
및 block_size 2를 입력하는 경우 :
x = [[[[1], [3]], [[9], [11]]], [[[2], [4]], [[10], [12]]], [[[5], [7]], [[13], [15]]], [[[6], [8]], [[14], [16]]]]
출력 텐서는 모양 [1, 4, 4, 1]
및 값 :
x = [[[[1], [2], [3], [4]], [[5], [6], [7], [8]], [[9], [10], [11], [12]], [[13], [14], [15], [16]]]]
(4) 다음과 같은 형태 [8, 1, 2, 1]
및 block_size 2를 입력하는 경우 :
x = [[[[1], [3]]], [[[9], [11]]], [[[2], [4]]], [[[10], [12]]], [[[5], [7]]], [[[13], [15]]], [[[6], [8]]], [[[14], [16]]]]
출력 텐서는 모양 [2, 2, 4, 1]
및 값 :
x = [[[[1], [3]], [[5], [7]]], [[[2], [4]], [[10], [12]]], [[[5], [7]], [[13], [15]]], [[[6], [8]], [[14], [16]]]]
생성자와 소멸자 | |
---|---|
BatchToSpace (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input crops, int64 block_size) |
공용 속성 | |
---|---|
operation | |
output |
공공 기능 | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
공용 속성
조작
Operation operation
산출
::tensorflow::Output output
공공 기능
BatchToSpace
BatchToSpace( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input crops, int64 block_size )
마디
::tensorflow::Node * node() const
연산자 :: tensorflow :: 입력
operator::tensorflow::Input() const
연산자 :: tensorflow :: 출력
operator::tensorflow::Output() const