Skip to content

Commit 025eba0

Browse files
fuhailinrhdong
authored andcommitted
Fix some typing errors
1 parent 81050bc commit 025eba0

File tree

1 file changed

+5
-5
lines changed
  • tensorflow_recommenders_addons/dynamic_embedding/python/keras/layers

1 file changed

+5
-5
lines changed

tensorflow_recommenders_addons/dynamic_embedding/python/keras/layers/embedding.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class Embedding(tf.keras.layers.Layer):
9292
not need to set a static vocabulary size, and there will be no hash conflicts
9393
between features.
9494
95-
The embedding layer allow arbirary input shape of feature ids, and get
95+
The embedding layer allows arbitrary input shape of feature ids, and get
9696
(shape(ids) + embedding_size) lookup result. Normally the first dimension
9797
is batch_size.
9898
@@ -121,14 +121,14 @@ def __init__(self,
121121
with_unique=True,
122122
**kwargs):
123123
"""
124-
Creates a Embedding layer.
124+
Creates an Embedding layer.
125125
126126
Args:
127127
embedding_size: An object convertible to int. Length of embedding vector
128128
to every feature id.
129129
key_dtype: Dtype of the embedding keys to weights. Default is int64.
130130
value_dtype: Dtype of the embedding weight values. Default is float32
131-
combiner: A string or a function to combine the lookup result. It's value
131+
combiner: A string or a function to combine the lookup result. Its value
132132
could be 'sum', 'mean', 'min', 'max', 'prod', 'std', etc. whose are
133133
one of tf.math.reduce_xxx.
134134
initializer: Initializer to the embedding values. Default is RandomNormal.
@@ -145,13 +145,13 @@ def __init__(self,
145145
embedding layer parameter since the dynamic embedding supports
146146
nearly infinite embedding space capacity.
147147
init_capacity: Integer. Initial number of kv-pairs in an embedding
148-
layer. The capacity will growth if the used space exceeded current
148+
layer. The capacity will grow if the used space exceeded current
149149
capacity.
150150
partitioner: A function to route the keys to specific devices for
151151
distributed embedding parameter.
152152
kv_creator: A KVCreator object to create external KV storage as
153153
embedding parameter.
154-
max_norm: If not `None`, each values is clipped if its l2-norm is larger
154+
max_norm: If not `None`, each value is clipped if its l2-norm is larger
155155
distribute_strategy: Used when creating ShadowVariable.
156156
keep_distribution: Bool. If true, save and restore python object with
157157
devices information. Default is false.

0 commit comments

Comments
 (0)