code: def __init__(
      self,
      n_features,
      hidden_neurons=(128, 64),
      dropout_rate=0.2,
      batch_norm=True,
      hidden_activation="relu",
  ):
      # initialize the super class
      super(InnerAutoencoder, self).__init__()
  
      # save the default values
      self.n_features = n_features
      self.dropout_rate = dropout_rate
      self.batch_norm = batch_norm
      self.hidden_activation = hidden_activation
  
      # create the dimensions for the input and hidden layers
      self.layers_neurons_encoder_ = [self.n_features, *hidden_neurons]
      self.layers_neurons_decoder_ = self.layers_neurons_encoder_[::-1]
  
      # get the object for the activations functions
      self.activation = get_activation_by_name(hidden_activation)
  
      # initialize encoder and decoder as a sequential
      self.encoder = nn.Sequential()
      self.decoder = nn.Sequential()
  
      # fill the encoder sequential with hidden layers
      for idx, layer in enumerate(self.layers_neurons_encoder_[:-1]):
          # create a linear layer of neurons
          self.encoder.add_module(
              "linear" + str(idx),
              torch.nn.Linear(
                  layer, self.layers_neurons_encoder_[idx + 1]
              ),
          )
  
          # add a batch norm per layer if wanted (leave out first layer)
          if batch_norm:
              self.encoder.add_module(
                  "batch_norm" + str(idx),
                  nn.BatchNorm1d(self.layers_neurons_encoder_[idx + 1]),
              )
  
          # create the activation
          self.encoder.add_module(
              self.hidden_activation + str(idx), self.activation
          )
  
          # create a dropout layer
          self.encoder.add_module(
              "dropout" + str(idx), torch.nn.Dropout(dropout_rate)
          )
  
      # fill the decoder layer
      for idx, layer in enumerate(self.layers_neurons_decoder_[:-1]):
          # create a linear layer of neurons
          self.decoder.add_module(
              "linear" + str(idx),
              torch.nn.Linear(
                  layer, self.layers_neurons_decoder_[idx + 1]
              ),
          )
  
          # create a batch norm per layer if wanted (only if it is not the
          # last layer)
          if (
              batch_norm
              and idx < len(self.layers_neurons_decoder_[:-1]) - 1
          ):
              self.decoder.add_module(
                  "batch_norm" + str(idx),
                  nn.BatchNorm1d(self.layers_neurons_decoder_[idx + 1]),
              )
  
          # create the activation
          self.decoder.add_module(
              self.hidden_activation + str(idx), self.activation
          )
  
          # create a dropout layer (only if it is not the last layer)
          if idx < len(self.layers_neurons_decoder_[:-1]) - 1:
              self.decoder.add_module(
                  "dropout" + str(idx), torch.nn.Dropout(dropout_rate)
              )
  
imports: from __future__ import division
  from __future__ import print_function
  import numpy
  import torch
  from sklearn.utils import check_array
  from sklearn.utils.validation import check_is_fitted
  from torch import nn
  from .base import BaseDetector
  from ..utils.stat_models import pairwise_distances_no_broadcast
  from ..utils.torch_utility import get_activation_by_name
label_desc: Use image node_id 1 to create a new InnerAutoencoder object from inherited base classes: nn with example: obj = InnerAutoencoder(n_features, hidden_neurons, dropout_rate, batch_norm, hidden_activation)