class_docstr: Class for NOTEARS MLP (Multi-layer Perceptron) model.
  The model weights consist of dag_layer and loc_lin_layer weights respectively.
  dag_layer weight is the weight of the first fully connected layer which determines the causal structure.
  loc_lin_layer weights are the weight of hidden layers after the first fully connected layer
class_docstr_tok: ["Class","for","NOTEARS","MLP","(","Multi-layer","Perceptron",")","model",".","The","model","weights","consist","of","dag_layer","and","loc_lin_layer","weights","respectively",".","dag_layer","weight","is","the","weight","of","the","first","fully","connected","layer","which","determines","the","causal","structure",".","loc_lin_layer","weights","are","the","weight","of","hidden","layers","after","the","first","fully","connected","layer"]
docstr: Feed forward calculation for the model.
  
  Args:
      x: input torch tensor
  
  Returns:
      output tensor from the model
docstr_tok: ["Feed","forward","calculation","for","the","model",".","Args",":","x",":","input","torch","tensor","Returns",":","output","tensor","from","the","model"]
code: def forward(
      self, x: torch.Tensor
  ) -> torch.Tensor:  # [n, d] -> [n, d]
      """
      Feed forward calculation for the model.
  
      Args:
          x: input torch tensor
  
      Returns:
          output tensor from the model
      """
      x = self.dag_layer(x)  # [n, d * m1]
      x = x.view(-1, self.dims[0], self.dims[1])  # [n, d, m1]
  
      for output_dim, layer in zip(
          self.dims[1:], self.loc_lin_layer_weights
      ):
          x = torch.sigmoid(x)  # [n, d, m1]
          x = nn.LayerNorm(
              output_dim,
              eps=self.nonlinear_clamp,
              elementwise_affine=True,
          )(x)
          x = layer(x)  # [n, d, m2]
  
      x = x.squeeze(dim=2)  # [n, d]
      return x
  
imports: import logging
  from typing import Iterable, List, Tuple, Union
  import numpy
  import scipy.optimize
  import torch
  from sklearn.base import BaseEstimator
  from torch import nn
  from causalnex.structure.pytorch.dist_type._base import DistTypeBase
  from causalnex.structure.pytorch.nonlinear import LocallyConnected
label_desc: Use image node_id 6 for calling the NotearsMLP obj's underlying member method code with example usage: obj.forward(x) and returns: x