nn.Conv2d计算
时间: 2023-08-21 07:12:41 浏览: 90
pytorch之卷积神经网络nn.conv2d
nn.Conv2d计算的是二维卷积操作。在给定输入和卷积核的情况下,它会计算出输出的大小和参数个数。根据引用\[2\]中的公式,假设输入尺寸为\[C_in, H, W\],输出大小的计算公式为\[C_out, (H-K+2*P)/S+1, (W-K+2*P)/S+1\],其中C_in是输入通道数,H和W是数据的尺寸,K是核大小,P是padding大小,S是步长stride大小。而参数个数的计算公式为C_out*K*K+C_out,其中C_out是输出通道数,K是核大小。所以,对于给定的输入和卷积核,我们可以使用这些公式来计算输出的大小和参数个数。
#### 引用[.reference_title]
- *1* [Pytorch复习笔记--nn.Conv2d()和nn.Conv3d()的计算公式](https://blog.csdn.net/weixin_43863869/article/details/129784028)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [pytorch nn.conv2d参数个数计算](https://blog.csdn.net/u012428169/article/details/114702453)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [【笔记】nn.Conv2d和nn.ConvTranspose2d:参数说明,卷积、反卷积后 图像的尺寸 计算公式](https://blog.csdn.net/nyist_yangguang/article/details/119874463)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文