class_docstr: A simple neural network with dense layers and sigmoid non-linearity.
  
  The network consists of `len(hidden_layers) + 1` dense layers. The sizes of
  the hidden layers are specified by the user in `hidden_layers` and the
  network takes care of adding layers to match the input and output size.
  
  Attributes:
    weights: A list of 2-d float32 arrays containing the layer weights.
    biases: A list of 2-d float32 arrays containing the layer biases.
  
  Methods:
    forward: Can be used to perform a forward pass on a batch of
      flattened images. Output is returned as a batch of one-hot vectors of the
      classes.
    train: method performs a forward and backward pass and updates the
      weights and biases.
    evaluate: method can be used to evaluate the network on a batch of
      examples.
docstr: Returns the number of correct predictions.
  
  Args:
    x: 2-d array of size batch_size x image_size.
    y: 2-d array of size batch_size x num_classes.
  
  Returns:
    A scalar, the number of correct predictions.
code: def evaluate(self, x, y):
      """Returns the number of correct predictions.
  
      Args:
        x: 2-d array of size batch_size x image_size.
        y: 2-d array of size batch_size x num_classes.
  
      Returns:
        A scalar, the number of correct predictions.
      """
      y_actual = np.argmax(y, axis=1)
      y_predicted = np.argmax(self.forward(x), axis=1)
      return int(
          np.sum(
              np.array(y_actual == y_predicted, copy=False, dtype=int32)
          )
      )
  
file_path: trax/trax/tf_numpy/examples/mnist/model.py
imports: from numpy import float32
  from numpy import int32
  import tensorflow.compat.v2
  from trax.tf_numpy import numpy
label_desc: Use image node_id 4 for calling the Model obj's underlying member method code with example usage: obj.evaluate(x, y) and returns: int