텐서플로우:: ops:: DepthwiseConv2dNative
#include <nn_ops.h> 4차원 input 및 filter 텐서가 주어졌을 때 2차원 깊이별 컨볼루션을 계산합니다.
요약
입력 텐서가 [batch, in_height, in_width, in_channels] 형태이고 필터/커널 텐서가 [filter_height, filter_width, in_channels, channel_multiplier] 형태이며, 깊이가 1 in_channels 컨볼루션 필터를 포함한다고 가정할 때, depthwise_conv2d 각 입력 채널에 서로 다른 필터를 적용합니다(각 채널마다 1개에서 channel_multiplier 채널까지 확장). 그런 다음 결과를 모두 연결합니다. 따라서 출력은 in_channels * channel_multiplier 채널을 갖습니다.
for k in 0..in_channels-1
for q in 0..channel_multiplier-1
output[b, i, j, k * channel_multiplier + q] =
sum_{di, dj} input[b, strides[1] * i + di, strides[2] * j + dj, k] *
filter[di, dj, k, q] strides[0] = strides[3] = 1 이어야 합니다. 수평 및 정점 strides가 같은 가장 일반적인 경우 strides = [1, stride, stride, 1] .
논거:
- 범위: Scope 객체
- strides: 1차원, 길이 4.
input의 각 차원에 대한 슬라이딩 윈도우의 스트라이드입니다. - padding: 사용할 패딩 알고리즘 유형입니다.
선택적 속성( Attrs 참조):
- data_format: 입력 및 출력 데이터의 형식을 지정합니다. 기본 형식인 "NHWC"의 경우 데이터는 [배치, 높이, 너비, 채널] 순서로 저장됩니다. 또는 형식을 "NCHW"로 지정할 수도 있으며, 이 경우 데이터는 [배치, 채널, 높이, 너비] 순서로 저장됩니다.
- 팽창: 길이가 4인 1차원 텐서.
input의 각 차원에 대한 팽창 계수입니다. k > 1로 설정하면 해당 차원의 각 필터 요소 사이에 k-1개의 셀이 건너뛰어집니다. 차원 순서는data_format값에 따라 결정됩니다. 자세한 내용은 위를 참조하십시오. 배치 및 깊이 차원의 팽창 값은 1이어야 합니다.
보고:
-
Output: 출력 텐서.
생성자와 소멸자 | |
|---|---|
DepthwiseConv2dNative (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding) | |
DepthwiseConv2dNative (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding, const DepthwiseConv2dNative::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) | |
구조 | |
|---|---|
| 텐서플로우:: ops:: DepthwiseConv2dNative:: Attrs | DepthwiseConv2dNative 에 대한 선택적 속성 설정기입니다. |
공개 속성
작업
Operation operation
산출
::tensorflow::Output output
공공 기능
깊이별Conv2dNative
DepthwiseConv2dNative( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding )
깊이별Conv2dNative
DepthwiseConv2dNative( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding, const DepthwiseConv2dNative::Attrs & attrs )
마디
::tensorflow::Node * node() const
연산자::텐서플로우::입력
operator::tensorflow::Input() const
연산자::텐서플로우::출력
operator::tensorflow::Output() const
공개 정적 함수
데이터 형식
Attrs DataFormat( StringPiece x )
확장
Attrs Dilations( const gtl::ArraySlice< int > & x )