tensorflow :: ops :: Conv2D
#include <nn_ops.h>
4 차원 input
및 filter
텐서가 주어진 경우 2 차원 컨볼 루션을 계산합니다.
요약
[batch, in_height, in_width, in_channels]
형태의 입력 텐서와 [filter_height, filter_width, in_channels, out_channels]
형태의 필터 / 커널 텐서가 [filter_height, filter_width, in_channels, out_channels]
이 연산은 다음을 수행합니다.
- 필터를
[filter_height * filter_width * in_channels, output_channels]
모양의 2 차원 행렬로 평평하게[filter_height * filter_width * in_channels, output_channels]
. - 입력 텐서에서 이미지 패치를 추출하여
[batch, out_height, out_width, filter_height * filter_width * in_channels]
모양의 가상 텐서를 형성합니다. - 각 패치에 대해 필터 행렬과 이미지 패치 벡터를 오른쪽 곱합니다.
자세히, 기본 NHWC 형식
output[b, i, j, k] = sum_{di, dj, q} input[b, strides[1] * i + di, strides[2] * j + dj, q] * filter[di, dj, q, k]
strides[0] = strides[3] = 1
이어야합니다. 동일한 수평 및 꼭지점 strides의 가장 일반적인 경우에 strides = [1, stride, stride, 1]
.
인수 :
- 범위 : 범위 개체
- 입력 : 4 차원 텐서. 차원 순서는
data_format
값에 따라 해석됩니다. 자세한 내용은 아래를 참조하십시오. - 필터 : 모양의 4 차원 텐서
[filter_height, filter_width, in_channels, out_channels]
- strides : 길이의 1 차원 텐서 4. 각
input
차원에 대한 슬라이딩 윈도우의 보폭. 차원 순서는data_format
값에 의해 결정됩니다. 자세한 내용은 아래를 참조하십시오. - padding : 사용할 채우기 알고리즘의 유형입니다.
선택적 속성 ( Attrs
참조) :
- explicit_paddings :
padding
이"EXPLICIT"
인 경우 명시 적 패딩 금액 목록입니다. i 번째 차원의 경우 차원 앞뒤에 삽입되는 패딩의 양은 각각explicit_paddings[2 * i]
및explicit_paddings[2 * i + 1]
입니다.padding
이"EXPLICIT"
가 아닌 경우explicit_paddings
는 비어 있어야합니다. - data_format : 입력 및 출력 데이터의 데이터 형식을 지정합니다. 기본 형식 "NHWC"를 사용하면 데이터가 [배치, 높이, 너비, 채널] 순서로 저장됩니다. 또는 형식은 데이터 저장 순서 인 "NCHW"일 수 있습니다. [배치, 채널, 높이, 너비].
- dilations : 길이 4의 1-D 텐서.
input
각 차원에 대한 확장 인자. k> 1로 설정하면 해당 차원의 각 필터 요소 사이에 k-1 개의 건너 뛴 셀이 있습니다. 차원 순서는data_format
의 값에 의해 결정됩니다. 자세한 내용은 위를 참조하십시오. 배치 및 깊이 치수의 확장은 1이어야합니다.
보고:
-
Output
: 4-D 텐서. 차원 순서는data_format
값에 의해 결정됩니다. 자세한 내용은 아래를 참조하십시오.
생성자와 소멸자 | |
---|---|
Conv2D (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding) | |
Conv2D (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding, const Conv2D::Attrs & attrs) |
공용 속성 | |
---|---|
operation | |
output |
공공 기능 | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
공개 정적 함수 | |
---|---|
DataFormat (StringPiece x) | |
Dilations (const gtl::ArraySlice< int > & x) | |
ExplicitPaddings (const gtl::ArraySlice< int > & x) | |
UseCudnnOnGpu (bool x) |
구조체 | |
---|---|
tensorflow :: ops :: Conv2D :: Attrs | Conv2D에 대한 선택적 속성 설정자. |
공용 속성
조작
Operation operation
산출
::tensorflow::Output output
공공 기능
Conv2D
Conv2D( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding )
Conv2D
Conv2D( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding, const Conv2D::Attrs & attrs )
마디
::tensorflow::Node * node() const
연산자 :: tensorflow :: 입력
operator::tensorflow::Input() const
연산자 :: tensorflow :: 출력
operator::tensorflow::Output() const
공개 정적 함수
DataFormat
Attrs DataFormat( StringPiece x )
팽창
Attrs Dilations( const gtl::ArraySlice< int > & x )
ExplicitPaddings
Attrs ExplicitPaddings( const gtl::ArraySlice< int > & x )
UseCudnnOnGpu
Attrs UseCudnnOnGpu( bool x )