code: def __init__(self, nfeatures=100, noutputs=10, nhiddens=50, rng=None):
      if rng is None:
          rng = 0
      if isinstance(rng, integer_types):
          rng = np.random.RandomState(rng)
      self.rng = rng
      self.nfeatures = nfeatures
      self.noutputs = noutputs
      self.nhiddens = nhiddens
  
      x = T.dmatrix("x")
      wh = th.shared(
          self.rng.normal(0, 1, (nfeatures, nhiddens)), borrow=True
      )
      bh = th.shared(np.zeros(nhiddens), borrow=True)
      h = T.nnet.sigmoid(T.dot(x, wh) + bh)
  
      wy = th.shared(self.rng.normal(0, 1, (nhiddens, noutputs)))
      by = th.shared(np.zeros(noutputs), borrow=True)
      y = T.nnet.softmax(T.dot(h, wy) + by)
  
      self.inputs = [x]
      self.outputs = [y]
  
file_path: Theano/theano/d3viz/tests/models.py
imports: from __future__ import absolute_import, print_function, division
  import numpy
  from six import integer_types
  import theano
  import theano.tensor
label_desc: Use image node_id 1 to create a new Mlp object from inherited base classes: object with example: obj = Mlp(nfeatures, noutputs, nhiddens, rng)