def METHOD_NAME(self):
    self.do_metric_alone = self.epoch <= self.metric_alone_epochs
    self.do_adv_alone = (
        self.metric_alone_epochs
        < self.epoch
        <= self.metric_alone_epochs + self.g_alone_epochs
    )
    self.do_both = not self.do_adv_alone and not self.do_metric_alone
    self.do_adv = self.do_adv_alone or self.do_both
    self.do_metric = self.do_metric_alone or self.do_both
    non_zero_weight_list = []
    if self.do_adv:
        non_zero_weight_list += ["g_hard_loss", "g_reg_loss", "g_adv_loss"]
    if self.do_metric:
        non_zero_weight_list += ["metric_loss", "classifier_loss"]
    if self.do_both:
        non_zero_weight_list += ["synth_loss"]
    for k in self.loss_weights.keys():
        if k in non_zero_weight_list:
            self.loss_weights[k] = self.original_loss_weights[k]
        else:
            self.loss_weights[k] = 0
    self.maybe_exclude_networks_from_gradient()