Supported Keras Operators¶
The Keras frontend supports Sequential() Keras models.
The list of supported operations is as follows:
Conv2DDepthwiseConv2DDenseBatchNormalizationMaxPooling2DAveragePooling2DFlattenAddZeroPadding2DActivationrelutanhsoftmax
Limitations¶
Currently, we support Convolutional Neural Networks (CNNs) that include the supported operators (above) - RNNs/LSTMs not supported
We currently only support models in NCHW format (NHWC is not supported)
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:
Activation ("softmax")
Example of what is NOT supported:
Dense(num_classes, activation="softmax")
For convolutions with stride > 1
sameconvolution is NOT supported. Explicitly addZeroPadding2Dlayer beforeConv2DorDepthwiseConv2Doperators. Example of what does NOT work:
Conv2D(num_filters, kernel_size=(3, 3), strides=(2, 2), padding="same")
Example of what works instead:
# NOTE: Amount of padding varies with kernel sizes and strides
ZeroPadding2D(padding=(1, 1), data_format="channels_first") # only support NCHW
Conv2D(num_filters, kernel_size=(3, 3), strides=(2, 2), padding="valid")