MultiPath/DepthwiseConv2d

Efficient implementation of Depthwise Conv2d. The main code is from https://github.com/MegEngine

★ 7Forks 1HTMLGitHub ↗Compare

README

Efficient Implementation Depthwise Convolution with large kernels

Installation

We can easily install the toolkit:

python setup.py install

or

pip install .

Usage

Please follow depthwise_conv2d_implicit_gemm.py for the detailed usage:

import torch.nn as nn
from depthwise_conv2d_implicit_gemm import DepthWiseConv2dImplicitGEMM

# depth-wise conv2d with kernel size 31
m1 = DepthWiseConv2dImplicitGEMM(384, 31, bias=False).cuda()

# navie pytorch implementation
m2 = nn.Conv2d(384, 384, 31, padding=31 // 2, bias=False, groups=384).cuda()

Contributors

ShiweiliuiiiiiiiMultiPath

Issues