docstr: Creates a neural network model.
  
  Parameters
  ----------
  optimizer : str
      The optimizer to use. Must be a class from the torch.optim package.
  loss_class : str
      The loss function to use. Must be a class from the torch.nn package.
  activation_class : str
      The activation function to use. Must be a class from the torch.nn package.
  learning_rate : float
      The learning rate for the optimizer.
  weight_decay : float
      The weight decay for the optimizer.
  epochs : int
      The number of epochs to train the model.
  batch_size : int
      The batch size to use during training.
  kwargs : dict, optional
      A dictionary containing the hyperparameters for the neural network. Every
      parameter will be passed down to the neural network.
docstr_tok: ["Creates","a","neural","network","model",".","Parameters","--","--","--","--","--","optimizer",":","str","The","optimizer","to","use",".","Must","be","a","class","from","the","torch.optim","package",".","loss_class",":","str","The","loss","function","to","use",".","Must","be","a","class","from","the","torch.nn","package",".","activation_class",":","str","The","activation","function","to","use",".","Must","be","a","class","from","the","torch.nn","package",".","learning_rate",":","float","The","learning","rate","for","the","optimizer",".","weight_decay",":","float","The","weight","decay","for","the","optimizer",".","epochs",":","int","The","number","of","epochs","to","train","the","model",".","batch_size",":","int","The","batch","size","to","use","during","training",".","kwargs",":","dict",",","optional","A","dictionary","containing","the","hyperparameters","for","the","neural","network",".","Every","parameter","will","be","passed","down","to","the","neural","network","."]
code: def __init__(
      self,
      optimizer: str,
      loss: str,
      activation: str,
      learning_rate: float,
      weight_decay: float,
      epochs: int,
      batch_size: int,
      **kwargs,
  ):
      """Creates a neural network model.
  
      Parameters
      ----------
      optimizer : str
          The optimizer to use. Must be a class from the torch.optim package.
      loss_class : str
          The loss function to use. Must be a class from the torch.nn package.
      activation_class : str
          The activation function to use. Must be a class from the torch.nn package.
      learning_rate : float
          The learning rate for the optimizer.
      weight_decay : float
          The weight decay for the optimizer.
      epochs : int
          The number of epochs to train the model.
      batch_size : int
          The batch size to use during training.
      kwargs : dict, optional
          A dictionary containing the hyperparameters for the neural network. Every
          parameter will be passed down to the neural network.
      """
      super().__init__(**kwargs)
      kwargs.pop("unawareness", None)
      self.logger = create_logger("methods.inprocessing.NeuralNetwork")
      self.optimizer_class = optimizer
      self.loss_class = loss
      kwargs["activation_type"] = import_object(activation)
      self.learning_rate = learning_rate
      self.weight_decay = weight_decay
      self.epochs = epochs
      self.batch_size = batch_size
      self.logger.debug(
          f"Instantiating neural network with parameters: {kwargs}."
      )
      self.model = TorchNeuralNetwork(**kwargs)
      self.optimizer: optim.Optimizer = None
  
file_path: aequitas/src/aequitas/fairflow/methods/base_estimator/neural_network.py
imports: from typing import Optional
  import pandas
  import torch
  from torch import nn, optim
  from torch.utils.data import DataLoader
  from tqdm import tqdm
  from ...utils import create_logger, import_object
  from .base_estimator import BaseEstimator
label_desc: Use image node_id 1 to create a new NeuralNetwork object from inherited base classes: BaseEstimator with example: obj = NeuralNetwork(optimizer, loss, activation, learning_rate, weight_decay, epochs, batch_size)