'Constructor for SquareBoxCoder.
Args:
scale_factors: List of 3 positive scalars to scale ty, tx, and tl.
If set to None, does not perform scaling. For faster RCNN,
the open-source implementation recommends using [10.0, 10.0, 5.0].
Raises:
ValueError: If scale_factors is not length 3 or contains values less than
or equal to 0.'

def __init__(self, scale_factors=None):

    if scale_factors:
        if (len(scale_factors) != 3):
            raise ValueError('The    argument    scale_factors    must    be    a    list    of    length    3.')
        if any(((scalar <= 0) for scalar in scale_factors)):
            raise ValueError('The    values    in    scale_factors    must    all    be    greater    than    0.')
    self._scale_factors = scale_factors
