def _is_uninitialized(model):
  """Checks whether no weights in the model have been initialized."""
  if not _is_empty(model.weights):
    return False
  return all(_is_uninitialized(l) for l in model.sublayers)
Checks whether no weights in the model have been initialized.
trax/supervised/training.py