compile.keras.engine.training.Model | R Documentation |
Configure a Keras model for training
## S3 method for class 'keras.engine.training.Model'
compile(
object,
optimizer = NULL,
loss = NULL,
metrics = NULL,
loss_weights = NULL,
weighted_metrics = NULL,
run_eagerly = NULL,
steps_per_execution = NULL,
...,
target_tensors = NULL,
sample_weight_mode = NULL
)
object |
Model object to compile. |
optimizer |
String (name of optimizer) or optimizer instance. For most
models, this defaults to |
loss |
String (name of objective function), objective function or a
|
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 |
loss_weights |
Optional list, dictionary, or named vector specifying
scalar numeric coefficients to weight the loss contributions of different
model outputs. The loss value that will be minimized by the model will then
be the weighted sum of all individual losses, weighted by the
|
weighted_metrics |
List of metrics to be evaluated and weighted by
|
run_eagerly |
Bool. Defaults to |
steps_per_execution |
Int. Defaults to 1. The number of batches to run
during each |
... |
Arguments supported for backwards compatibility only. |
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 |
sample_weight_mode |
If you need to do timestep-wise sample weighting
(2D weights), set this to "temporal". |
Other model functions:
evaluate.keras.engine.training.Model()
,
evaluate_generator()
,
fit.keras.engine.training.Model()
,
fit_generator()
,
get_config()
,
get_layer()
,
keras_model()
,
keras_model_sequential()
,
multi_gpu_model()
,
pop_layer()
,
predict.keras.engine.training.Model()
,
predict_generator()
,
predict_on_batch()
,
predict_proba()
,
summary.keras.engine.training.Model()
,
train_on_batch()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.