1. 1x1的卷积核的作用
- 在width和height不变的基础上改变通道的数量
- 减少计算量
2. GoogLeNet中Inception Module的实现
2.1 Inception块的代码实现
import torch.nn.functional as F
class InceptinA(torch.nn.Module):
def __init__(self,channels):
super(InceptinA, self).__init__()
self.branch_pool = torch.nn.Conv2d(channels,24,kernel_size=1)
self.branch1x1 = torch.nn.Conv2d(channels,16,kernel_size=1)
self.branch5x5_1 = torch.nn.Conv2d(channels,16,kernel_size=1)
self.branch5x5_2 = torch.nn.Conv2d(16,24,kernel_size=5,padding=2)
self.branch3x3_1 = torch.nn.Conv2d(channels,