Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. class DepthWiseConv(nn.Module):
  2.     """
  3.    depth wise followed by point wise convolution
  4.    """
  5.  
  6.     def __init__(self, in_planes, out_planes, stride=1, padding=-1):
  7.         super().__init__()
  8.         self.ds_conv = ConvBNReLU(in_planes, in_planes, kernel_size=3,
  9.                                   stride=stride, groups=in_planes, padding=padding)
  10.         self.pw_conv = ConvBNReLU(in_planes, out_planes, kernel_size=1)
  11.  
  12.     def forward(self, x):
  13.         return self.pw_conv(self.ds_conv(x))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement