PEP8 formatting.
@@ -276,6 +276,7 @@ class Replay(SupervisedTemplate):
**base_kwargs
)
+
class GenerativeReplay(SupervisedTemplate):
"""Naive finetuning.
@@ -323,14 +324,14 @@ class GenerativeReplay(SupervisedTemplate):
:param **base_kwargs: any additional
:class:`~avalanche.training.BaseTemplate` constructor arguments.
"""
- ''' self.generator = Generator
+ """ self.generator = Generator
rp = GenerativeReplayPlugin(mem_size, generator=self.generator)
vaep = VAEPlugin()
if plugins is None:
plugins = [rp, vaep]
else:
plugins.append(rp)
- plugins.append(vaep) '''
+ plugins.append(vaep) """
super().__init__(
model,
@@ -346,6 +347,7 @@ class GenerativeReplay(SupervisedTemplate):
**base_kwargs
)
+
class GenerativeReplayForGenerator(SupervisedTemplate):
"""Naive finetuning.
@@ -411,7 +413,8 @@ class GenerativeReplayForGenerator(SupervisedTemplate):
def criterion(self):
"""Loss function."""
- return self._criterion(self.mb_x ,self.mb_x_recon, self.mean, self.logvar)
+ return self._criterion(self.mb_x, self.mb_x_recon,
+ self.mean, self.logvar)
class GSS_greedy(SupervisedTemplate):
