Skip to content

semipy.tools.get_optimizer

Warning

This section is in construction.

    semipy.tools.get_optimizer(args, model) -> torch.optim.Optimizer

Get optimizer from PyTorch. This function reads a dictionary of parameters and returns the asked optimizer with the right parameters. If no parameters are given in the dictionary, default values from PyTorch are used.

Parameters

  • args (dict) - A dictionary containing optimizer parameters.
  • model - A PyTorch based model to train.