code: def train_cli(cfg):
      """Train a self-supervised model from the command-line.
  
      Args:
          cfg:
              The default configs are loaded from the config file.
              To overwrite them please see the section on the config file
              (.config.config.yaml).
  
      Command-Line Args:
          input_dir:
              Path to the input directory where images are stored.
  
      Examples:
          >>> # train model with default settings
          >>> lightly-train input_dir=data/
          >>>
          >>> # train model with batches of size 128
          >>> lightly-train input_dir=data/ loader.batch_size=128
          >>>
          >>> # train model for 10 epochs
          >>> lightly-train input_dir=data/ trainer.max_epochs=10
          >>>
          >>> # print a full summary of the model
          >>> lightly-train input_dir=data/ trainer.weights_summary=full
  
      """
      return _train_cli(cfg)
  
file_path: lightly/lightly/cli/train_cli.py
imports: import copy
  import os
  import warnings
  import hydra
  import torch
  import torch.nn
  from omegaconf import OmegaConf
  from lightly.cli._cli_simclr import _SimCLR
  from lightly.cli._helpers import cpu_count, fix_hydra_arguments, fix_input_path, get_ptmodel_from_config, is_url, load_from_state_dict, load_state_dict_from_url
  from lightly.data import ImageCollateFunction, LightlyDataset
  from lightly.embedding import SelfSupervisedEmbedding
  from lightly.loss import NTXentLoss
  from lightly.models import ResNetGenerator
  from lightly.models.batchnorm import get_norm_layer
  from lightly.utils.hipify import bcolors
label_desc: Use image node_id 2 for calling a global function with example usage: train_cli(cfg) and returns: _train_cli