class_docstr: Overall parent module that holds the dictionary of expert autoencoders
  and expert classifiers.
class_docstr_tok: ["Overall","parent","module","that","holds","the","dictionary","of","expert","autoencoders","and","expert","classifiers","."]
code: def _get_average_reconstruction_error(self, autoencoder_id, x):
      # Select autoencoder with the given ID
      autoencoder = self.autoencoder_dict[str(autoencoder_id)]
  
      # Run input through autoencoder to get reconstruction
      reconstruction = autoencoder(x)
  
      # Process input for target
      target = sigmoid(autoencoder.feature_module(x))
  
      # Error between reconstruction and input
      error = AE_loss(target=target, reconstruction=reconstruction)
  
      return error
  
imports: from collections import OrderedDict
  from copy import deepcopy
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import sigmoid
  from torch.nn.functional import mse_loss, softmax
  from torchvision import transforms
  import torchvision.models
  from .utils import FeatureExtractorBackbone
  from avalanche.models import MultiTaskModule
  from avalanche.models.utils import Flatten
  from avalanche.benchmarks.scenarios.generic_scenario import CLExperience
label_desc: Use image node_id 2 for calling the ExpertGate obj's underlying member method code with example usage: obj._get_average_reconstruction_error(autoencoder_id, x) and returns: error