ModelStatics

ModelStatics

Manages the hyperparameters that do not change over the course of the grid search (i.e. those not governed by an Axis).

Constructor

new ModelStatics(_userStatics)

Creates an instance of ModelStatics.
- See Axis.AxisTypes for the available fields.
- See Axis.AxisDefaults for defaults.
All fields are optional. Any field used here that also has an axis will be ignored (the dynamic axis values will be used instead).
Example
new tngs.ModelStatics({
  batchSize: 10,
  epochs: 50,
  hiddenLayers: 2,
  learnRate: 0.001,
  neuronsPerHiddenLayer: 16,
  validationSplit: 0.2
});
Parameters:
Name Type Description
_userStatics Types.StringKeyedNumbersObject
Source:

Methods

AttemptStripParam(paramKey)

Check whether the received parameter key is also part in our set. If so, delete the entry, after printing an informative warning to the log.
Parameters:
Name Type Description
paramKey string
Source:

GenerateInitializerBias() → {TF_INITIALIZERS.Initializer}

Produces a TensorFlow initializer for bias nodes.
Currently set to constant(0.1)
Returns:
Type
TF_INITIALIZERS.Initializer
Source:

GenerateInitializerKernel() → {TF_INITIALIZERS.Initializer}

Produces a TensorFlow initializer for kernel nodes.
Currently set to heNormal()
Returns:
Type
TF_INITIALIZERS.Initializer
Source:

GenerateLossFunction() → {string}

Produces a TensorFlow loss function identifier.
Currently set to "categoricalCrossentropy"
Returns:
Type
string
Source:

GenerateOptimizer(learnRate) → {TENSOR_FLOW.Optimizer}

Produces a TensorFlow optimizer.
Currently set to adam(learnRate)
Parameters:
Name Type Description
learnRate number The learning rate. See https://en.wikipedia.org/wiki/Stochastic_gradient_descent#Adam
Returns:
Type
TENSOR_FLOW.Optimizer
Source:

ShallowCloneParams() → {Types.StringKeyedSimpleObject}

Produce a shallow clone of the remaining parameters as a simple object.
Returns:
Type
Types.StringKeyedSimpleObject
Source: