def _depthwise_conv_block(inputs, pointwise_conv_filters, alpha, depth_multiplier=1, strides=(1, 1), block_id=1):
    "Adds a depthwise convolution block.\n\n  A depthwise convolution block consists of a depthwise conv,\n  batch normalization, relu6, pointwise convolution,\n  batch normalization and relu6 activation.\n\n  Arguments:\n      inputs: Input tensor of shape `(rows, cols, channels)`\n          (with `channels_last` data format) or\n          (channels, rows, cols) (with `channels_first` data format).\n      pointwise_conv_filters: Integer, the dimensionality of the output space\n          (i.e. the number output of filters in the pointwise convolution).\n      alpha: controls the width of the network.\n          - If `alpha` < 1.0, proportionally decreases the number\n              of filters in each layer.\n          - If `alpha` > 1.0, proportionally increases the number\n              of filters in each layer.\n          - If `alpha` = 1, default number of filters from the paper\n               are used at each layer.\n      depth_multiplier: The number of depthwise convolution output channels\n          for each input channel.\n          The total number of depthwise convolution output\n          channels will be equal to `filters_in * depth_multiplier`.\n      strides: An integer or tuple/list of 2 integers,\n          specifying the strides of the convolution along the width and height.\n          Can be a single integer to specify the same value for\n          all spatial dimensions.\n          Specifying any stride value != 1 is incompatible with specifying\n          any `dilation_rate` value != 1.\n      block_id: Integer, a unique identification designating the block number.\n\n  Input shape:\n      4D tensor with shape:\n      `(batch, channels, rows, cols)` if data_format='channels_first'\n      or 4D tensor with shape:\n      `(batch, rows, cols, channels)` if data_format='channels_last'.\n\n  Output shape:\n      4D tensor with shape:\n      `(batch, filters, new_rows, new_cols)` if data_format='channels_first'\n      or 4D tensor with shape:\n      `(batch, new_rows, new_cols, filters)` if data_format='channels_last'.\n      `rows` and `cols` values might have changed due to stride.\n\n  Returns:\n      Output tensor of block.\n  "
    channel_axis = (1 if (K.image_data_format() == 'channels_first') else (- 1))
    pointwise_conv_filters = int((pointwise_conv_filters * alpha))
    x = DepthwiseConv2D((3, 3), padding='same', depth_multiplier=depth_multiplier, strides=strides, use_bias=False, name=('conv_dw_%d' % block_id))(inputs)
    x = BatchNormalization(axis=channel_axis, name=('conv_dw_%d_bn' % block_id))(x)
    x = Activation(relu6, name=('conv_dw_%d_relu' % block_id))(x)
    x = Conv2D(pointwise_conv_filters, (1, 1), padding='same', use_bias=False, strides=(1, 1), name=('conv_pw_%d' % block_id))(x)
    x = BatchNormalization(axis=channel_axis, name=('conv_pw_%d_bn' % block_id))(x)
    return Activation(relu6, name=('conv_pw_%d_relu' % block_id))(x)
Adds a depthwise convolution block.

A depthwise convolution block consists of a depthwise conv,
batch normalization, relu6, pointwise convolution,
batch normalization and relu6 activation.

Arguments:
    inputs: Input tensor of shape `(rows, cols, channels)`
        (with `channels_last` data format) or
        (channels, rows, cols) (with `channels_first` data format).
    pointwise_conv_filters: Integer, the dimensionality of the output space
        (i.e. the number output of filters in the pointwise convolution).
    alpha: controls the width of the network.
        - If `alpha` < 1.0, proportionally decreases the number
            of filters in each layer.
        - If `alpha` > 1.0, proportionally increases the number
            of filters in each layer.
        - If `alpha` = 1, default number of filters from the paper
             are used at each layer.
    depth_multiplier: The number of depthwise convolution output channels
        for each input channel.
        The total number of depthwise convolution output
        channels will be equal to `filters_in * depth_multiplier`.
    strides: An integer or tuple/list of 2 integers,
        specifying the strides of the convolution along the width and height.
        Can be a single integer to specify the same value for
        all spatial dimensions.
        Specifying any stride value != 1 is incompatible with specifying
        any `dilation_rate` value != 1.
    block_id: Integer, a unique identification designating the block number.

Input shape:
    4D tensor with shape:
    `(batch, channels, rows, cols)` if data_format='channels_first'
    or 4D tensor with shape:
    `(batch, rows, cols, channels)` if data_format='channels_last'.

Output shape:
    4D tensor with shape:
    `(batch, filters, new_rows, new_cols)` if data_format='channels_first'
    or 4D tensor with shape:
    `(batch, new_rows, new_cols, filters)` if data_format='channels_last'.
    `rows` and `cols` values might have changed due to stride.

Returns:
    Output tensor of block.
def _depthwise_conv_block(inputs, pointwise_conv_filters, alpha, depth_multiplier=1, strides=(1, 1), block_id=1):
    "Adds a depthwise convolution block.\n\n  A depthwise convolution block consists of a depthwise conv,\n  batch normalization, relu6, pointwise convolution,\n  batch normalization and relu6 activation.\n\n  Arguments:\n      inputs: Input tensor of shape `(rows, cols, channels)`\n          (with `channels_last` data format) or\n          (channels, rows, cols) (with `channels_first` data format).\n      pointwise_conv_filters: Integer, the dimensionality of the output space\n          (i.e. the number output of filters in the pointwise convolution).\n      alpha: controls the width of the network.\n          - If `alpha` < 1.0, proportionally decreases the number\n              of filters in each layer.\n          - If `alpha` > 1.0, proportionally increases the number\n              of filters in each layer.\n          - If `alpha` = 1, default number of filters from the paper\n               are used at each layer.\n      depth_multiplier: The number of depthwise convolution output channels\n          for each input channel.\n          The total number of depthwise convolution output\n          channels will be equal to `filters_in * depth_multiplier`.\n      strides: An integer or tuple/list of 2 integers,\n          specifying the strides of the convolution along the width and height.\n          Can be a single integer to specify the same value for\n          all spatial dimensions.\n          Specifying any stride value != 1 is incompatible with specifying\n          any `dilation_rate` value != 1.\n      block_id: Integer, a unique identification designating the block number.\n\n  Input shape:\n      4D tensor with shape:\n      `(batch, channels, rows, cols)` if data_format='channels_first'\n      or 4D tensor with shape:\n      `(batch, rows, cols, channels)` if data_format='channels_last'.\n\n  Output shape:\n      4D tensor with shape:\n      `(batch, filters, new_rows, new_cols)` if data_format='channels_first'\n      or 4D tensor with shape:\n      `(batch, new_rows, new_cols, filters)` if data_format='channels_last'.\n      `rows` and `cols` values might have changed due to stride.\n\n  Returns:\n      Output tensor of block.\n  "
    channel_axis = (1 if (K.image_data_format() == 'channels_first') else (- 1))
    pointwise_conv_filters = int((pointwise_conv_filters * alpha))
    x = DepthwiseConv2D((3, 3), padding='same', depth_multiplier=depth_multiplier, strides=strides, use_bias=False, name=('conv_dw_%d' % block_id))(inputs)
    x = BatchNormalization(axis=channel_axis, name=('conv_dw_%d_bn' % block_id))(x)
    x = Activation(relu6, name=('conv_dw_%d_relu' % block_id))(x)
    x = Conv2D(pointwise_conv_filters, (1, 1), padding='same', use_bias=False, strides=(1, 1), name=('conv_pw_%d' % block_id))(x)
    x = BatchNormalization(axis=channel_axis, name=('conv_pw_%d_bn' % block_id))(x)
    return Activation(relu6, name=('conv_pw_%d_relu' % block_id))(x)