Skip to content

Commit

Permalink
fix rename problem
Browse files Browse the repository at this point in the history
  • Loading branch information
LukyanovKirillML committed Jul 23, 2024
1 parent 725783f commit 9ec13bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/models_builder/gnn_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,9 +803,9 @@ def train_1_step(self, gen_dataset):

def train_on_batch(self, batch, task_type=None):
if self.mi_defender:
self.mi_defender.pre_epoch()
self.mi_defender.pre_batch()
if self.evasion_defender:
self.evasion_defender.pre_epoch(model_manager=self, batch=batch)
self.evasion_defender.pre_batch(model_manager=self, batch=batch)
loss = None
if task_type == "single-graph":
self.optimizer.zero_grad()
Expand Down Expand Up @@ -840,7 +840,7 @@ def train_on_batch(self, batch, task_type=None):
else:
raise ValueError("Unsupported task type")
if self.mi_defender:
self.mi_defender.post_epoch()
self.mi_defender.post_batch()
evasion_defender_dict = None
if self.evasion_defender:
evasion_defender_dict = self.evasion_defender.post_batch(
Expand Down

0 comments on commit 9ec13bf

Please sign in to comment.