code: def __init__(self, nfeatures=100, noutputs=10, nhiddens=50, rng=None):
      if rng is None:
          rng = 0
      if isinstance(rng, int):
          rng = np.random.default_rng(rng)
      self.rng = rng
      self.nfeatures = nfeatures
      self.noutputs = noutputs
      self.nhiddens = nhiddens
  
      x = dmatrix("x")
      wh = shared(
          self.rng.normal(0, 1, (nfeatures, nhiddens)), borrow=True
      )
      bh = shared(np.zeros(nhiddens), borrow=True)
      h = pt.sigmoid(pt.dot(x, wh) + bh)
  
      wy = shared(self.rng.normal(0, 1, (nhiddens, noutputs)))
      by = shared(np.zeros(noutputs), borrow=True)
      y = softmax(pt.dot(h, wy) + by, axis=-1)
      self.inputs = [x]
      self.outputs = [y]
  
file_path: pytensor/tests/d3viz/models.py
imports: import numpy
  import pytensor.tensor
  from pytensor import shared
  from pytensor.compile.builders import OpFromGraph
  from pytensor.tensor.special import softmax
  from pytensor.tensor.type import dmatrix, scalars
label_desc: Use image node_id 1 to create a new Mlp object  with example: obj = Mlp(nfeatures, noutputs, nhiddens, rng)