Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class DepthWiseConv(nn.Module):
- """
- depth wise followed by point wise convolution
- """
- def __init__(self, in_planes, out_planes, stride=1, padding=-1):
- super().__init__()
- self.ds_conv = ConvBNReLU(in_planes, in_planes, kernel_size=3,
- stride=stride, groups=in_planes, padding=padding)
- self.pw_conv = ConvBNReLU(in_planes, out_planes, kernel_size=1)
- def forward(self, x):
- return self.pw_conv(self.ds_conv(x))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement