diff --git a/keras/engine/training.py b/keras/engine/training.py index 04977ca1cba..582239d1993 100644 --- a/keras/engine/training.py +++ b/keras/engine/training.py @@ -507,7 +507,7 @@ def compile(self, Args: optimizer: String (name of optimizer) or optimizer instance. See `tf.keras.optimizers`. - loss: Loss function. Maybe be a string (name of loss function), or + loss: Loss function. May be a string (name of loss function), or a `tf.keras.losses.Loss` instance. See `tf.keras.losses`. A loss function is any callable with the signature `loss = fn(y_true, y_pred)`, where `y_true` are the ground truth values, and diff --git a/keras/preprocessing/text_dataset.py b/keras/preprocessing/text_dataset.py index a5da9318f58..ab3619115d4 100644 --- a/keras/preprocessing/text_dataset.py +++ b/keras/preprocessing/text_dataset.py @@ -111,7 +111,7 @@ def text_dataset_from_directory(directory, `(batch_size,)`. - if `label_mode` is `binary`, the labels are a `float32` tensor of 1s and 0s of shape `(batch_size, 1)`. - - if `label_mode` is `categorial`, the labels are a `float32` tensor + - if `label_mode` is `categorical`, the labels are a `float32` tensor of shape `(batch_size, num_classes)`, representing a one-hot encoding of the class index. """