def _verify_weight_parameters(weight_parameters):
  """Verifies that the format of the input `weight_parameters`.

  Checks that the input parameters is a 2-tuple of tensors of equal shape.

  Args:
    weight_parameters: The parameters to check.

  Raises:
    RuntimeError: If the input is not a 2-tuple of tensors with equal shape.

  Returns:
    The input `weight_parameters`.
  """
  if len(weight_parameters) != 2:
    raise RuntimeError("Incorrect number of weight parameters. Expected "
                       "2 tensors, got {}".format(len(weight_parameters)))
  if weight_parameters[0].shape != weight_parameters[1].shape:
    raise RuntimeError("Expected theta and log alpha parameter tensor "
                       "to be same shape. Got shapes {} and {}"
                       .format(weight_parameters[0].get_shape().as_list(),
                               weight_parameters[1].get_shape().as_list()))
  return weight_parameters