# Path: utils/custom_layers.py
# def abs_smooth(x):
# def abs_smooth_2(x):
# def l2_normalization(
#         inputs,
#         scaling=False,
#         scale_initializer=init_ops.ones_initializer(),
#         reuse=None,
#         variables_collections=None,
#         outputs_collections=None,
#         data_format='NHWC',
#         trainable=True,
#         scope=None):
# def pad2d(inputs,
#           pad=(0, 0),
#           mode='CONSTANT',
#           data_format='NHWC',
#           trainable=True,
#           scope=None):
# def channel_to_last(inputs,
#                     data_format='NHWC',
#                     scope=None):
# def dropout_with_noise(net):


import tensorflow as tf
import numpy as np
import math
import tf_extended as tfe
import ssd
from collections import namedtuple
from utils import custom_layers
    w[0] = sizes[0] / img_shape[1]
    di = 1
    if len(sizes) > 1:
        h[1] = math.sqrt(sizes[0] * sizes[1]) / img_shape[0]
        w[1] = math.sqrt(sizes[0] * sizes[1]) / img_shape[1]
        di += 1
    for i, r in enumerate(ratios):
        h[i + di] = sizes[0] / img_shape[0] / math.sqrt(r)
        w[i + di] = sizes[0] / img_shape[1] * math.sqrt(r)
    return y, x, h, w


def arg_scope(weight_decay=0.0005, data_format='NHWC'):
    """Defines the VGG arg scope.

    Args:
      weight_decay: The l2 regularization coefficient.

    Returns:
      An arg_scope.
    """
    with slim.arg_scope([slim.conv2d, slim.fully_connected],
                        activation_fn=tf.nn.relu,
                        weights_regularizer=slim.l2_regularizer(weight_decay),
                        weights_initializer=tf.contrib.layers.xavier_initializer(),
                        biases_initializer=tf.zeros_initializer()):
        with slim.arg_scope([slim.conv2d, slim.max_pool2d],
                            padding='SAME',
                            data_format=data_format):
            with slim.arg_scope([custom_layers.pad2d,

# Path: utils/custom_layers.py
# def abs_smooth(x):
# def abs_smooth_2(x):
# def l2_normalization(
#         inputs,
#         scaling=False,
#         scale_initializer=init_ops.ones_initializer(),
#         reuse=None,
#         variables_collections=None,
#         outputs_collections=None,
#         data_format='NHWC',
#         trainable=True,
#         scope=None):
# def pad2d(inputs,
#           pad=(0, 0),
#           mode='CONSTANT',
#           data_format='NHWC',
#           trainable=True,
#           scope=None):
# def channel_to_last(inputs,
#                     data_format='NHWC',
#                     scope=None):
# def dropout_with_noise(net):


# Path: ssd/ssd_utils.py
import tensorflow as tf
import numpy as np
import math
import tf_extended as tfe
import ssd
from collections import namedtuple
from utils import custom_layers

    w[0] = sizes[0] / img_shape[1]
    di = 1
    if len(sizes) > 1:
        h[1] = math.sqrt(sizes[0] * sizes[1]) / img_shape[0]
        w[1] = math.sqrt(sizes[0] * sizes[1]) / img_shape[1]
        di += 1
    for i, r in enumerate(ratios):
        h[i + di] = sizes[0] / img_shape[0] / math.sqrt(r)
        w[i + di] = sizes[0] / img_shape[1] * math.sqrt(r)
    return y, x, h, w


def arg_scope(weight_decay=0.0005, data_format='NHWC'):
    """Defines the VGG arg scope.

    Args:
      weight_decay: The l2 regularization coefficient.

    Returns:
      An arg_scope.
    """
    with slim.arg_scope([slim.conv2d, slim.fully_connected],
                        activation_fn=tf.nn.relu,
                        weights_regularizer=slim.l2_regularizer(weight_decay),
                        weights_initializer=tf.contrib.layers.xavier_initializer(),
                        biases_initializer=tf.zeros_initializer()):
        with slim.arg_scope([slim.conv2d, slim.max_pool2d],
                            padding='SAME',
                            data_format=data_format):
            with slim.arg_scope([custom_layers.pad2d,

                                 custom_layers.l2_normalization,