class_docstr: A plain implementation of SGD
  
  :param learningrate learning rate
  :param learningrate_decay learning rate decay
  :param weightdecay weight decay
  :param momentum momentum
  :param dampening dampening for momentum
  :param nesterov enables Nesterov momentum
  :param learningrates 1D tensor of individual learning rates
  :param weightdecays 1D tensor of individual weight decays
  >>> sgd = SGD()
  creating: createDefault
  creating: createSGD
class_docstr_tok: ["A","plain","implementation","of","SGD",":","param","learningrate","learning","rate",":","param","learningrate_decay","learning","rate","decay",":","param","weightdecay","weight","decay",":","param","momentum","momentum",":","param","dampening","dampening","for","momentum",":","param","nesterov","enables","Nesterov","momentum",":","param","learningrates","1D","tensor","of","individual","learning","rates",":","param","weightdecays","1D","tensor","of","individual","weight","decays",">",">",">","sgd","=","SGD","(",")","creating",":","createDefault","creating",":","createSGD"]
code: def __init__(
      self,
      learningrate: float = 1e-3,
      learningrate_decay: float = 0.0,
      weightdecay: float = 0.0,
      momentum: float = 0.0,
      dampening: float = DOUBLEMAX,
      nesterov: bool = False,
      learningrate_schedule: Optional["Scheduler"] = None,
      learningrates: Optional["np.ndarray"] = None,
      weightdecays: Optional["np.ndarray"] = None,
  ) -> None:
      from bigdl.dllib.optim.optimizer import SGD as BSGD
  
      invalidInputError(
          isinstance(learningrate_schedule, Scheduler),
          "learningrate_schedule should be an "
          "bigdl.orca.learn.optimizers.schedule.Scheduler,"
          " but got {learningrate_schedule}",
      )
      self.optimizer = BSGD(
          learningrate,
          learningrate_decay,
          weightdecay,
          momentum,
          dampening,
          nesterov,
          learningrate_schedule.get_scheduler(),  # type: ignore
          learningrates,
          weightdecays,
          bigdl_type="float",
      )
  
imports: from abc import ABC, abstractmethod
  from bigdl.dllib.utils.common import DOUBLEMAX
  from bigdl.orca.learn.optimizers.schedule import Scheduler
  from bigdl.dllib.utils.log4Error import invalidInputError
  from typing import Any, Optional, Dict, TYPE_CHECKING
label_desc: Use image node_id 1 to create a new SGD object from inherited base classes: Optimizer with example: obj = SGD(learningrate, learningrate_decay, weightdecay, momentum, dampening, nesterov, learningrate_schedule, learningrates, weightdecays)