'Constructor for FasterRcnnBoxCoder.
Args:
scale_factors: List of 4 positive scalars to scale ty, tx, th and tw.
If set to None, does not perform scaling. For Faster RCNN,
the open-source implementation recommends using [10.0, 10.0, 5.0, 5.0].'

def __init__(self, scale_factors=None):

    if scale_factors:
        assert (len(scale_factors) == 4)
        for scalar in scale_factors:
            assert (scalar > 0)
    self._scale_factors = scale_factors
