- inputs
List of keras input layers
- intermediate_output
Intermediate model layer to be used as input to
distribution parameters
- dist
A Distribution
to use for compiling the loss and parameter
outputs
- optimizer
String (name of optimizer) or optimizer instance. For most
models, this defaults to "rmsprop"
- censoring
A flag, whether the compiled model should support censored
observations. Set to FALSE
for higher efficiency. fit(...)
will error if
the resulting model is used to fit censored observations.
- truncation
A flag, whether the compiled model should support truncated
observations. Set to FALSE
for higher efficiency. fit(...)
will warn if
the resuting model is used to fit truncated observations.
- metrics
List of metrics to be evaluated by the model during training
and testing. Each of this can be a string (name of a built-in function),
function or a keras$metrics$Metric
class instance. See
?tf$keras$metrics
. Typically you will use metrics=list('accuracy')
. A
function is any callable with the signature result = fn(y_true, y_pred)
.
To specify different metrics for different outputs of a multi-output model,
you could also pass a dictionary, such as metrics=list(output_a = 'accuracy', output_b = c('accuracy', 'mse'))
. You can also pass a list to
specify a metric or a list of metrics for each output, such as
metrics=list(list('accuracy'), list('accuracy', 'mse'))
or
metrics=list('accuracy', c('accuracy', 'mse'))
. When you pass the strings
'accuracy'
or 'acc'
, this is converted to one of
tf.keras.metrics.BinaryAccuracy
, tf.keras.metrics.CategoricalAccuracy
,
tf.keras.metrics.SparseCategoricalAccuracy
based on the loss function
used and the model output shape. A similar conversion is done for the
strings 'crossentropy'
and 'ce'
.
- sample_weight_mode
If you need to do timestep-wise sample weighting
(2D weights), set this to "temporal". NULL
defaults to sample-wise
weights (1D). If the model has multiple outputs, you can use a different
sample_weight_mode
on each output by passing a list of modes.
- weighted_metrics
List of metrics to be evaluated and weighted by
sample_weight
or class_weight
during training and testing.
- target_tensors
By default, Keras will create a placeholder for the
model's target, which will be fed with the target data during training. If
instead you would like to use your own target tensor (in turn, Keras will
not expect external data for these targets at training time), you can
specify them via the target_tensors
argument. It should be a single
tensor (for a single-output sequential model).