Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.2 KB

File metadata and controls

40 lines (29 loc) · 1.2 KB

MKL-DNN Depthwise Convolution Layer - An Example

Deep Neural Network Library (DNNL) is an open-source C++ performance library for deep learning applications developed by Intel. BUT it doesn't provide a depthwise convolution API. Here I give an example to implement depthwise convolution by DNNL.

Please note that since DNNL is still under active updates, it may support depthwise in the future, please DO NOT rely too much on this example, please refer to the official documentation and official repository FIRST.

Next, I will use Keras and DNNL separately and use the same data to implement depthwise convolution.

Keras Implement

Requirements:

  • numpy
  • tensorflow>1.80
  • keras

RUN:

python depthwise.py

DNNL Implement

Requirements(ArchLinux):

$ pacman -Ss dnnl
community/intel-dnnl 1.2-1 [installed]
    Intel Deep Neural Network Library (formerly mkl-dnn)
$ pacman -S intel-dnnl

Build:

g++ -std=c++11 -ldnnl depthwise.cc -o depth

Run:

./depth