เทนเซอร์โฟลว์:: ปฏิบัติการ:: DepthwiseConv2dNative
#include <nn_ops.h> คำนวณการบิดเชิงลึกแบบ 2 มิติโดยได้รับ input 4 มิติและเทนเซอร์ filter
สรุป
เมื่อพิจารณาเทนเซอร์อินพุตของรูปร่าง [batch, in_height, in_width, in_channels] และตัวกรอง / เทนเซอร์เคอร์เนลของรูปร่าง [filter_height, filter_width, in_channels, channel_multiplier] ซึ่งมีตัวกรอง in_channels convolutional ความลึก 1, 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 = [1, stride, stride, 1]
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- ก้าว: 1-D ของความยาว 4 ก้าวของหน้าต่างบานเลื่อนสำหรับ
inputแต่ละมิติ - padding: ประเภทของอัลกอริธึมการเติมที่จะใช้
แอ็ตทริบิวต์ทางเลือก (ดู Attrs ):
- data_format: ระบุรูปแบบข้อมูลของข้อมูลอินพุตและเอาต์พุต ด้วยรูปแบบเริ่มต้น "NHWC" ข้อมูลจะถูกจัดเก็บตามลำดับ: [แบทช์ ความสูง ความกว้าง ช่อง] หรืออีกทางหนึ่ง รูปแบบอาจเป็น "NCHW" ซึ่งเป็นลำดับการจัดเก็บข้อมูลเป็น: [แบทช์ ช่อง ความสูง ความกว้าง]
- การขยาย: เทนเซอร์ 1-D ที่มีความยาว 4. ปัจจัยการขยายสำหรับแต่ละมิติของ
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
งานสาธารณะ
DepthwiseConv2dNative
DepthwiseConv2dNative( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding )
DepthwiseConv2dNative
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
ตัวดำเนินการ::tensorflow::อินพุต
operator::tensorflow::Input() const
ตัวดำเนินการ::tensorflow::เอาต์พุต
operator::tensorflow::Output() const
ฟังก์ชันคงที่สาธารณะ
รูปแบบข้อมูล
Attrs DataFormat( StringPiece x )
การขยาย
Attrs Dilations( const gtl::ArraySlice< int > & x )