From 8f6d71565bd319a22eeb9e0a6eb9369193c97afc Mon Sep 17 00:00:00 2001 From: Sachin Prasad Date: Thu, 29 Aug 2024 09:36:30 -0700 Subject: [PATCH] Update embedding.py (#20179) Change from positive to nonnegative. --- keras/src/layers/core/embedding.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keras/src/layers/core/embedding.py b/keras/src/layers/core/embedding.py index 7ce905f0cab..310596ce216 100644 --- a/keras/src/layers/core/embedding.py +++ b/keras/src/layers/core/embedding.py @@ -13,11 +13,11 @@ @keras_export("keras.layers.Embedding") class Embedding(Layer): - """Turns positive integers (indexes) into dense vectors of fixed size. + """Turns nonnegative integers (indexes) into dense vectors of fixed size. e.g. `[[4], [20]] -> [[0.25, 0.1], [0.6, -0.2]]` - This layer can only be used on positive integer inputs of a fixed range. + This layer can only be used on nonnegative integer inputs of a fixed range. Example: