code: def log_params(params, name="params"):
    
    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))
docs: Dumps the params with `logging.error`.