Dumps the params with `logging.error`.

def log_params(params, name="params"):
  """Dumps the params with `logging.error`."""
  for i, param in enumerate(params):
    if not param:
      # Empty tuple.
      continue
    if not isinstance(param, (list, tuple)):
      logging.error(
          "%s[%d] : (%s) = [%s]", name, i, param.shape, onp.array(param))
    else:
      for j, p in enumerate(param):
        logging.error(
            "\t%s[%d, %d] = [%s]", name, i, j, onp.array(p))