def _add_autoencoder(self, strategy: "SupervisedTemplate", task_label):
        """Builds a new autoencoder and stores it in the ExpertGate
        autoencoder dictionary. Returns the new autoencoder.
        """
        # Build a new autoencoder
        # This shape is equivalent to the output shape of
        # the Alexnet features module
        new_autoencoder = ExpertAutoencoder(
            shape=(256, 6, 6), latent_dim=strategy.ae_latent_dim, device=strategy.device
        )

        # Store autoencoder with task number
        strategy.model.autoencoder_dict[str(task_label)] = new_autoencoder

        return new_autoencoder
Builds a new autoencoder and stores it in the ExpertGate
        autoencoder dictionary. Returns the new autoencoder.
        
avalanche/training/supervised/expert_gate.py