from tensorflow.contrib import slim

    }
    if is_training is not None:
        batch_norm_params["is_training"] = is_training

    # Set weight_decay for weights in Conv and DepthSepConv layers.
    weights_init = tf.keras.initializers.glorot_normal()
    regularizer = contrib_layers.l2_regularizer(weight_decay)
    if regularize_depthwise:
        depthwise_regularizer = regularizer
    else:
        depthwise_regularizer = None
    with slim.arg_scope(
        [slim.conv2d, slim.separable_conv2d],
        weights_initializer=weights_init,
        activation_fn=tf.nn.relu6,
        normalizer_fn=normalizer_fn,
    ):
        with slim.arg_scope([slim.batch_norm], **batch_norm_params):
            with slim.arg_scope([slim.conv2d], weights_regularizer=regularizer):
                with slim.arg_scope(
                    [slim.separable_conv2d], weights_regularizer=depthwise_regularizer
                ) as sc:
