def __init__(self, beta: float=(1.0 / 9.0), code_weights: list=None):
    '\n        Args:\n            beta: Scalar float.\n                L1 to L2 change point.\n                For beta values < 1e-5, L1 loss is computed.\n            code_weights: (#codes) float list if not None.\n                Code-wise weights.\n        '
    super(WeightedSmoothL1Loss, self).__init__()
    self.beta = beta
    if (code_weights is not None):
        self.code_weights = np.array(code_weights, dtype=np.float32)
        self.code_weights = torch.from_numpy(self.code_weights).cuda()
Args:
    beta: Scalar float.
        L1 to L2 change point.
        For beta values < 1e-5, L1 loss is computed.
    code_weights: (#codes) float list if not None.
        Code-wise weights.
def __init__(self, beta: float=(1.0 / 9.0), code_weights: list=None):
    '\n        Args:\n            beta: Scalar float.\n                L1 to L2 change point.\n                For beta values < 1e-5, L1 loss is computed.\n            code_weights: (#codes) float list if not None.\n                Code-wise weights.\n        '
    super(WeightedSmoothL1Loss, self).__init__()
    self.beta = beta
    if (code_weights is not None):
        self.code_weights = np.array(code_weights, dtype=np.float32)
        self.code_weights = torch.from_numpy(self.code_weights).cuda()