Pass new arguments from strategy to plugin.
@@ -313,6 +313,8 @@ class GenerativeReplay(SupervisedTemplate):
evaluator: EvaluationPlugin = default_evaluator,
eval_every=-1,
generator_strategy: BaseTemplate = None,
+ replay_size: int = None,
+ increasing_replay_size: bool = False,
**base_kwargs
):
"""
@@ -363,9 +365,14 @@ class GenerativeReplay(SupervisedTemplate):
criterion=VAE_loss, train_mb_size=train_mb_size,
train_epochs=train_epochs,
eval_mb_size=eval_mb_size, device=device,
- plugins=[GenerativeReplayPlugin()])
-
- rp = GenerativeReplayPlugin(generator_strategy=self.generator_strategy)
+ plugins=[GenerativeReplayPlugin(
+ replay_size=replay_size,
+ increasing_replay_size=increasing_replay_size)])
+
+ rp = GenerativeReplayPlugin(
+ generator_strategy=self.generator_strategy,
+ replay_size=replay_size,
+ increasing_replay_size=increasing_replay_size)
tgp = TrainGeneratorAfterExpPlugin()
