def __init__(self, training_samples: TensorList, y: TensorList, filter_reg: torch.Tensor, sample_weights: TensorList, response_activation): self.training_samples = training_samples.variable() self.y = y.variable() self.filter_reg = filter_reg self.sample_weights = sample_weights self.response_activation = response_activation
def __init__(self, problem: L2Problem, variable: TensorList, cg_eps=0.0, fletcher_reeves=True, standard_alpha=True, direction_forget_factor=0, debug=False, plotting=False, fig_num=(10, 11)): super().__init__(fletcher_reeves, standard_alpha, direction_forget_factor, debug or plotting) self.problem = problem self.x = variable.variable() self.plotting = plotting self.fig_num = fig_num self.cg_eps = cg_eps self.f0 = None self.g = None self.dfdxt_g = None self.residuals = torch.zeros(0) self.losses = torch.zeros(0)
def __init__(self, training_samples: TensorList, y: TensorList, filter_reg: torch.Tensor, projection_reg, params, sample_weights: TensorList, projection_activation, response_activation): self.training_samples = training_samples self.y = y.variable() self.filter_reg = filter_reg self.sample_weights = sample_weights self.params = params self.projection_reg = projection_reg self.projection_activation = projection_activation self.response_activation = response_activation self.diag_M = self.filter_reg.concat(projection_reg)