Skip to content

Commit

Permalink
fix icarl test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbinSou committed Jan 25, 2024
1 parent 0875745 commit 26f13ed
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/training/test_strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,13 +853,14 @@ def test_expertgate(self):
strategy.train(experience)

def test_icarl(self):
model, optimizer, criterion, benchmark = self.init_scenario(multi_task=False)
model = SimpleMLP(input_size=6, hidden_size=10)
optimizer = SGD(model.parameters(), lr=0.000001)
_, optimizer, criterion, benchmark = self.init_scenario(multi_task=False)
fe = torch.nn.Linear(6, 10)
cls = torch.nn.Sigmoid()
optimizer = SGD([*fe.parameters(), *cls.parameters()], lr=0.001)

strategy = ICaRL(
model.features,
model.classifier,
fe,
cls,
optimizer,
20,
buffer_transform=None,
Expand Down

0 comments on commit 26f13ed

Please sign in to comment.