def fc_forward(mat_x, mat_w, vec_b):
  """Forward pass of Fully-Connected layer.

  A good reference for this is: http://cs231n.github.io/linear-classify/#score

  Args:
    mat_x: NxD ndarray, N is number of features, D is length of feature vector
    mat_w: DxC ndarray, C is number of classes.
    vec_b: length C ndarray.

  Returns:
    a tuple of (mat_out, cached)
    mat_out: NxC ndarray, as defined by Y=X*W+b.
    cached: value stored to help calculating gradient in backward pass.
  """
  mat_out = mat_x.dot(mat_w) + vec_b
  cached = (mat_x, mat_w)
  return mat_out, cached