There cannot be newlines in Args, Returns, Raises section, because in markdown that's a paragraph and the website render comes out wrong. See https://www.tensorflow.org/api_docs/python/tf/keras/Sequential?version=nightly#arguments_3
PiperOrigin-RevId: 291990085 Change-Id: Ic698330b7939c3847fca0d6dbfe4a610569b873c
This commit is contained in:
parent
805ca9e0f0
commit
5467eb43e7
@ -236,7 +236,6 @@ class Model(network.Network, version_utils.VersionSelector):
|
||||
See `tf.keras.optimizers`.
|
||||
loss: String (name of objective function), objective function or
|
||||
`tf.keras.losses.Loss` instance. See `tf.keras.losses`.
|
||||
|
||||
An objective function is any callable with the signature
|
||||
`loss = fn(y_true, y_pred)`, where
|
||||
y_true = ground truth values with shape = `[batch_size, d0, .. dN]`,
|
||||
@ -244,23 +243,19 @@ class Model(network.Network, version_utils.VersionSelector):
|
||||
where shape = `[batch_size, d0, .. dN-1]`.
|
||||
y_pred = predicted values with shape = `[batch_size, d0, .. dN]`.
|
||||
It returns a weighted loss float tensor.
|
||||
|
||||
If a custom `Loss` instance is used and reduction is set to NONE,
|
||||
return value has the shape [batch_size, d0, .. dN-1] ie. per-sample
|
||||
or per-timestep loss values; otherwise, it is a scalar.
|
||||
|
||||
If the model has multiple outputs, you can use a different loss on
|
||||
each output by passing a dictionary or a list of losses. The loss
|
||||
value that will be minimized by the model will then be the sum of
|
||||
all individual losses.
|
||||
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 `tf.keras.metrics.Metric` instance. See `tf.keras.metrics`.
|
||||
Typically you will use `metrics=['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={'output_a': 'accuracy', 'output_b': ['accuracy', 'mse']}`.
|
||||
|
Loading…
Reference in New Issue
Block a user