DiffSharp


Optimizer Type

Namespace: DiffSharp.Optim

Assembly: DiffSharp.Core.dll


Base Type: obj

Constructors

Constructor Description
Optimizer(model)
Full Usage:
Optimizer(model) Parameter Types:
  • model : Model

Return Type: Optimizer
Signature: (model: Model) -> Optimizer
Parameter Types:
  • model : Model
Return Type: Optimizer

Instance members

Instance member Description
this.model
Full Usage:
this.model
Return Type: Model
Signature: Model
Return Type: Model
this.step()
Full Usage:
this.step()
Signature: unit -> unit
this.updateRule arg1 arg2
Full Usage:
this.updateRule arg1 arg2 Parameter Types:
  • arg0 : string
  • arg1 : Tensor

Return Type: Tensor
Signature: string -> Tensor -> Tensor
Modifiers: abstract
Parameter Types:
  • arg0 : string
  • arg1 : Tensor
Return Type: Tensor

Static members

Static member Description
Optimizer.adam(model, dataloader, loss, ?lr, ?beta1, ?beta2, ?eps, ?weightDecay, ?reversible, ?iters, ?epochs, ?threshold, ?print, ?printEvery, ?printPrefix, ?printPostfix, ?printNewLine)
Full Usage:
Optimizer.adam(model, dataloader, loss, ?lr, ?beta1, ?beta2, ?eps, ?weightDecay, ?reversible, ?iters, ?epochs, ?threshold, ?print, ?printEvery, ?printPrefix, ?printPostfix, ?printNewLine) Parameter Types:
  • model : Model
  • dataloader : DataLoader
  • loss : Tensor -> Tensor -> Tensor
  • ?lr : Tensor
  • ?beta1 : Tensor
  • ?beta2 : Tensor
  • ?eps : Tensor
  • ?weightDecay : Tensor
  • ?reversible : bool
  • ?iters : int
  • ?epochs : int
  • ?threshold : double
  • ?print : bool
  • ?printEvery : int
  • ?printPrefix : string
  • ?printPostfix : string
  • ?printNewLine : bool

Signature: (model: Model * dataloader: DataLoader * loss: (Tensor -> Tensor -> Tensor) * lr: Tensor * beta1: Tensor * beta2: Tensor * eps: Tensor * weightDecay: Tensor * reversible: bool * iters: int * epochs: int * threshold: double * print: bool * printEvery: int * printPrefix: string * printPostfix: string * printNewLine: bool) -> unit
Parameter Types:
  • model : Model
  • dataloader : DataLoader
  • loss : Tensor -> Tensor -> Tensor
  • ?lr : Tensor
  • ?beta1 : Tensor
  • ?beta2 : Tensor
  • ?eps : Tensor
  • ?weightDecay : Tensor
  • ?reversible : bool
  • ?iters : int
  • ?epochs : int
  • ?threshold : double
  • ?print : bool
  • ?printEvery : int
  • ?printPrefix : string
  • ?printPostfix : string
  • ?printNewLine : bool
Optimizer.adam(f, x0, ?lr, ?beta1, ?beta2, ?eps, ?iters, ?threshold, ?print, ?printEvery, ?printPrefix, ?printPostfix, ?printNewLine)
Full Usage:
Optimizer.adam(f, x0, ?lr, ?beta1, ?beta2, ?eps, ?iters, ?threshold, ?print, ?printEvery, ?printPrefix, ?printPostfix, ?printNewLine) Parameter Types:
  • f : Tensor -> Tensor
  • x0 : Tensor
  • ?lr : Tensor
  • ?beta1 : Tensor
  • ?beta2 : Tensor
  • ?eps : Tensor
  • ?iters : int
  • ?threshold : double
  • ?print : bool
  • ?printEvery : int
  • ?printPrefix : string
  • ?printPostfix : string
  • ?printNewLine : bool

Return Type: Tensor * Tensor
Signature: (f: (Tensor -> Tensor) * x0: Tensor * lr: Tensor * beta1: Tensor * beta2: Tensor * eps: Tensor * iters: int * threshold: double * print: bool * printEvery: int * printPrefix: string * printPostfix: string * printNewLine: bool) -> Tensor * Tensor
Parameter Types:
  • f : Tensor -> Tensor
  • x0 : Tensor
  • ?lr : Tensor
  • ?beta1 : Tensor
  • ?beta2 : Tensor
  • ?eps : Tensor
  • ?iters : int
  • ?threshold : double
  • ?print : bool
  • ?printEvery : int
  • ?printPrefix : string
  • ?printPostfix : string
  • ?printNewLine : bool
Return Type: Tensor * Tensor
Optimizer.sgd(model, dataloader, loss, ?lr, ?momentum, ?nesterov, ?weightDecay, ?reversible, ?iters, ?epochs, ?threshold, ?print, ?printEvery, ?printPrefix, ?printPostfix, ?printNewLine)
Full Usage:
Optimizer.sgd(model, dataloader, loss, ?lr, ?momentum, ?nesterov, ?weightDecay, ?reversible, ?iters, ?epochs, ?threshold, ?print, ?printEvery, ?printPrefix, ?printPostfix, ?printNewLine) Parameter Types:
  • model : Model
  • dataloader : DataLoader
  • loss : Tensor -> Tensor -> Tensor
  • ?lr : Tensor
  • ?momentum : Tensor
  • ?nesterov : bool
  • ?weightDecay : Tensor
  • ?reversible : bool
  • ?iters : int
  • ?epochs : int
  • ?threshold : double
  • ?print : bool
  • ?printEvery : int
  • ?printPrefix : string
  • ?printPostfix : string
  • ?printNewLine : bool

Signature: (model: Model * dataloader: DataLoader * loss: (Tensor -> Tensor -> Tensor) * lr: Tensor * momentum: Tensor * nesterov: bool * weightDecay: Tensor * reversible: bool * iters: int * epochs: int * threshold: double * print: bool * printEvery: int * printPrefix: string * printPostfix: string * printNewLine: bool) -> unit
Parameter Types:
  • model : Model
  • dataloader : DataLoader
  • loss : Tensor -> Tensor -> Tensor
  • ?lr : Tensor
  • ?momentum : Tensor
  • ?nesterov : bool
  • ?weightDecay : Tensor
  • ?reversible : bool
  • ?iters : int
  • ?epochs : int
  • ?threshold : double
  • ?print : bool
  • ?printEvery : int
  • ?printPrefix : string
  • ?printPostfix : string
  • ?printNewLine : bool
Optimizer.sgd(f, x0, ?lr, ?momentum, ?nesterov, ?iters, ?threshold, ?print, ?printEvery, ?printPrefix, ?printPostfix, ?printNewLine)
Full Usage:
Optimizer.sgd(f, x0, ?lr, ?momentum, ?nesterov, ?iters, ?threshold, ?print, ?printEvery, ?printPrefix, ?printPostfix, ?printNewLine) Parameter Types:
  • f : Tensor -> Tensor
  • x0 : Tensor
  • ?lr : Tensor
  • ?momentum : Tensor
  • ?nesterov : bool
  • ?iters : int
  • ?threshold : double
  • ?print : bool
  • ?printEvery : int
  • ?printPrefix : string
  • ?printPostfix : string
  • ?printNewLine : bool

Return Type: Tensor * Tensor
Signature: (f: (Tensor -> Tensor) * x0: Tensor * lr: Tensor * momentum: Tensor * nesterov: bool * iters: int * threshold: double * print: bool * printEvery: int * printPrefix: string * printPostfix: string * printNewLine: bool) -> Tensor * Tensor
Parameter Types:
  • f : Tensor -> Tensor
  • x0 : Tensor
  • ?lr : Tensor
  • ?momentum : Tensor
  • ?nesterov : bool
  • ?iters : int
  • ?threshold : double
  • ?print : bool
  • ?printEvery : int
  • ?printPrefix : string
  • ?printPostfix : string
  • ?printNewLine : bool
Return Type: Tensor * Tensor