def random_init(self, param=True):
     if param is True:
         bound = self.lp_bound
     else:
         bound = param
     self.delta = nn.Parameter(utils.random_from_lp_ball(self.delta.data,
                                                         self.lp_style,
                                                         bound))
    def random_init(self):
        param_list = list(self.xform.parameters())
        assert len(param_list) == 1
        param = param_list[0]
        random_perturb = utils.random_from_lp_ball(param.data, self.lp_style,
                                                   self.lp_bound)

        param.data.add_(self.xform.identity_params + random_perturb -
                        self.xform.xform_params.data)
 def random_init(self):
     self.delta = nn.Parameter(
         utils.random_from_lp_ball(self.delta.data, self.lp_style,
                                   self.lp_bound))