ModelBase Type

Represents the base class of all models.

Record fields

Record Field Description

mode

Full Usage: mode

Field type: Mode
Modifiers: mutable
Field type: Mode

Constructors

Constructor Description

ModelBase()

Full Usage: ModelBase()

Returns: ModelBase
Returns: ModelBase

Instance members

Instance member Description

this.addBuffer (buffer, name)

Full Usage: this.addBuffer (buffer, name)

Parameters:
buffer : Parameter
name : string

this.addBuffer buffers

Full Usage: this.addBuffer buffers

Parameters:
buffers : (Parameter * string)[]

this.addBuffer buffers

Full Usage: this.addBuffer buffers

Parameters:
buffers : Parameter[]

this.addModel (model, name)

Full Usage: this.addModel (model, name)

Parameters:
    model : Model
    name : string

model : Model
name : string

this.addModel models

Full Usage: this.addModel models

Parameters:
    models : (Model * string)[]

models : (Model * string)[]

this.addModel models

Full Usage: this.addModel models

Parameters:
models : Model[]

this.addModel (model, name)

Full Usage: this.addModel (model, name)

Parameters:
model : ModelBase
name : string

this.addModel models

Full Usage: this.addModel models

Parameters:
models : (ModelBase * string)[]

this.addModel models

Full Usage: this.addModel models

Parameters:
models : ModelBase[]

this.addParameter (parameter, name)

Full Usage: this.addParameter (parameter, name)

Parameters:
parameter : Parameter
name : string

this.addParameter parameters

Full Usage: this.addParameter parameters

Parameters:
parameters : (Parameter * string)[]

this.addParameter parameters

Full Usage: this.addParameter parameters

Parameters:
parameters : Parameter[]

this.backend

Full Usage: this.backend

Returns: Backend
Returns: Backend

this.buffers

Full Usage: this.buffers

TBD

this.buffersVector

Full Usage: this.buffersVector

TBD

this.children

Full Usage: this.children

Returns: ModelBase list

TBD

Returns: ModelBase list

this.clone ()

Full Usage: this.clone ()

Returns: ModelBase

TBD

Returns: ModelBase

this.descendants

Full Usage: this.descendants

Returns: ModelBase list

TBD

Returns: ModelBase list

this.device

Full Usage: this.device

Returns: Device
Returns: Device

this.dtype

Full Usage: this.dtype

Returns: Dtype
Returns: Dtype

this.eval ()

Full Usage: this.eval ()

TBD

this.forwardDiff (derivatives, ?nestingTag)

Full Usage: this.forwardDiff (derivatives, ?nestingTag)

Parameters:
    derivatives : ParameterDict - The derivatives of the parameters
    ?nestingTag : uint32 - The level tag for nested differentiation. Defaults to the current global nesting level

Adjust the parameters of the model to initiate a new level of forward-mode automatic differentiation.

After this call the current parameters of the model will have attached derivatives for forward mode differentiation.

derivatives : ParameterDict

The derivatives of the parameters

?nestingTag : uint32

The level tag for nested differentiation. Defaults to the current global nesting level

this.hasOwnBuffers

Full Usage: this.hasOwnBuffers

Returns: bool

TBD

Returns: bool

this.hasOwnParameters

Full Usage: this.hasOwnParameters

Returns: bool

TBD

Returns: bool

this.hasOwnState

Full Usage: this.hasOwnState

Returns: bool

TBD

Returns: bool

this.init f

Full Usage: this.init f

Parameters:

TBD

f : string * Tensor -> Tensor

this.isForwardDiff

Full Usage: this.isForwardDiff

Returns: bool
Returns: bool

this.isNoDiff

Full Usage: this.isNoDiff

Returns: bool
Returns: bool

this.isReverseDiff

Full Usage: this.isReverseDiff

Returns: bool
Returns: bool

this.move (?device, ?dtype, ?backend)

Full Usage: this.move (?device, ?dtype, ?backend)

Parameters:

Moves the state (parameters and buffers) of the model to the given configuration

?device : Device
?dtype : Dtype
?backend : Backend

this.nbuffers

Full Usage: this.nbuffers

Returns: int

TBD

Returns: int

this.noDiff ()

Full Usage: this.noDiff ()

TBD

this.nparameters

Full Usage: this.nparameters

Returns: int

Gets the number of parameters of the Model

Returns: int

this.nstate

Full Usage: this.nstate

Returns: int

TBD

Returns: int

this.parameters

Full Usage: this.parameters

TBD

this.parametersVector

Full Usage: this.parametersVector

TBD

this.reverseDiff ?nestingTag

Full Usage: this.reverseDiff ?nestingTag

Parameters:
    ?nestingTag : uint32 - The level tag for nested differentiation. Defaults to the current global nesting level

Adjust the parameters of the model to initiate a new level of reverse-mode automatic differentiation.

After this call the current parameters of the model will support reverse-mode differentiation. After the completion of the corresponding reverse operation, the computed derivatives will be available.

?nestingTag : uint32

The level tag for nested differentiation. Defaults to the current global nesting level

this.state

Full Usage: this.state

TBD

this.stateVector

Full Usage: this.stateVector

TBD

this.summary ()

Full Usage: this.summary ()

Returns: string

TBD

Returns: string

this.train ()

Full Usage: this.train ()

TBD


© Copyright 2021, DiffSharp Contributors.