From b8ffe341e677c84f84836aedb47fc8307a9b15c2 Mon Sep 17 00:00:00 2001 From: hsharif3 <hsharif3@illinois.edu> Date: Thu, 25 Mar 2021 07:38:00 +0000 Subject: [PATCH] Update Support.md --- hpvm/projects/keras/docs/Support.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/hpvm/projects/keras/docs/Support.md b/hpvm/projects/keras/docs/Support.md index e5e7b1a1a2..ba4dafcb92 100644 --- a/hpvm/projects/keras/docs/Support.md +++ b/hpvm/projects/keras/docs/Support.md @@ -1,4 +1,3 @@ - ## Supported Keras Operators The Keras frontend supports `Sequential()` Keras models. @@ -27,14 +26,28 @@ The list of supported operations is as follows: * Softmax operator should be the last operation in the CNN pipeline * Softmax operation must be a separate operator (not specified as activation to another type of Keras operator). Example of what works: -``` +```python Activation ("softmax") ``` Example of what is NOT supported: -``` +```python Dense(num_classes, activation="softmax") ``` +* For convolutions with stride > 1 `same` convolution is NOT supported. Explicitly add `ZeroPadding2D` layer before `Conv2D` or `DepthwiseConv2D` operators. Example of what does NOT work: + +```python +Conv2D(num_filters, (3,3), strides = (2,2), padding = `same`) +``` + +Example of what works instead: + +```python +ZeroPadding2D(padding=(1,1), data_format = `channels_first`) # only support NCHW +Conv2D(num_filters, (3,3), strides = (2,2), padding = `valid`) +``` + + -- GitLab