docstr: Fit detector. y is ignored in unsupervised methods.
  
  Parameters
  ----------
  X : numpy array of shape (n_samples, n_features)
      The input samples.
  
  y : Ignored
      Not used, present for API consistency by convention.
  
  Returns
  -------
  self : object
      Fitted estimator.
docstr_tok: ["Fit","detector",".","y","is","ignored","in","unsupervised","methods",".","Parameters","--","--","--","--","--","X",":","numpy","array","of","shape","(","n_samples",",","n_features",")","The","input","samples",".","y",":","Ignored","Not","used",",","present","for","API","consistency","by","convention",".","Returns","--","--","--","-","self",":","object","Fitted","estimator","."]
code: def fit(self, X, y=None):
      """Fit detector. y is ignored in unsupervised methods.
  
      Parameters
      ----------
      X : numpy array of shape (n_samples, n_features)
          The input samples.
  
      y : Ignored
          Not used, present for API consistency by convention.
  
      Returns
      -------
      self : object
          Fitted estimator.
      """
      # validate inputs X and y (optional)
      X = check_array(X)
      self._set_n_classes(y)
  
      self.mean, self.std = np.mean(X_train, axis=0), np.mean(
          X_train, axis=0
      )
  
      train_set = PyODDataset(X=X_train, mean=self.mean, std=self.std)
      train_loader = torch.utils.data.DataLoader(
          train_set, batch_size=batch_size, shuffle=True
      )
  
      # initialize the model
      self.model = inner_autoencoder(
          hidden_neurons=self.hidden_neurons,
          dropout_rate=self.dropout_rate,
          batch_norm=self.batch_norm,
          preprocessing=self.preprocessing,
      )
  
      self.model = self.model.to(self.device)
      # print model information
      print(self.model)
      self._train_autoencoder(train_loader)
  
      self.model.load_state_dict(self.best_model_dict)
      self.decision_scores_ = self.decision_function(X_train)
  
imports: from __future__ import division
  from __future__ import print_function
  import torch
  import numpy
  from sklearn.preprocessing import StandardScaler
  from sklearn.utils import check_array
  from sklearn.utils.validation import check_is_fitted
  from pyod.utils.utility import check_parameter
  from pyod.utils.stat_models import pairwise_distances_no_broadcast
  from pyod.models.base import BaseDetector
  from pyod.utils.data import generate_data
  from pyod.utils.stat_models import pairwise_distances_no_broadcast
  from torch import nn
  from torchvision import transforms
label_desc: Use image node_id 2 for calling the AutoEncoder obj's underlying member method code with example usage: obj.fit(X, y) without return types