Configuration for calls to LayersModel.compile().

interface ModelCompileArgs {
    loss: string | string[] | {
        [outputName: string]: string;
    } | LossOrMetricFn | LossOrMetricFn[] | {
        [outputName: string]: LossOrMetricFn;
    };
    metrics?: string | LossOrMetricFn | (string | LossOrMetricFn)[] | {
        [outputName: string]: string | LossOrMetricFn;
    };
    optimizer: string | Optimizer;
}

Properties

loss: string | string[] | {
    [outputName: string]: string;
} | LossOrMetricFn | LossOrMetricFn[] | {
    [outputName: string]: LossOrMetricFn;
}

Object function(s) or name(s) of object function(s). If the model has multiple outputs, you can use a different loss on each output by passing a dictionary or an Array of losses. The loss value that will be minimized by the model will then be the sum of all individual losses.

Type declaration

  • [outputName: string]: string

Type declaration

  • [outputName: string]: LossOrMetricFn
metrics?: string | LossOrMetricFn | (string | LossOrMetricFn)[] | {
    [outputName: string]: string | LossOrMetricFn;
}

List of metrics to be evaluated by the model during training and testing. Typically you will use metrics=['accuracy']. To specify different metrics for different outputs of a multi-output model, you could also pass a dictionary.

Type declaration

  • [outputName: string]: string | LossOrMetricFn
optimizer: string | Optimizer

An instance of tf.train.Optimizer or a string name for an Optimizer.

Generated using TypeDoc