@@ -92,7 +92,7 @@ class Embedding(tf.keras.layers.Layer):
92
92
not need to set a static vocabulary size, and there will be no hash conflicts
93
93
between features.
94
94
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
96
96
(shape(ids) + embedding_size) lookup result. Normally the first dimension
97
97
is batch_size.
98
98
@@ -121,14 +121,14 @@ def __init__(self,
121
121
with_unique = True ,
122
122
** kwargs ):
123
123
"""
124
- Creates a Embedding layer.
124
+ Creates an Embedding layer.
125
125
126
126
Args:
127
127
embedding_size: An object convertible to int. Length of embedding vector
128
128
to every feature id.
129
129
key_dtype: Dtype of the embedding keys to weights. Default is int64.
130
130
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
132
132
could be 'sum', 'mean', 'min', 'max', 'prod', 'std', etc. whose are
133
133
one of tf.math.reduce_xxx.
134
134
initializer: Initializer to the embedding values. Default is RandomNormal.
@@ -145,13 +145,13 @@ def __init__(self,
145
145
embedding layer parameter since the dynamic embedding supports
146
146
nearly infinite embedding space capacity.
147
147
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
149
149
capacity.
150
150
partitioner: A function to route the keys to specific devices for
151
151
distributed embedding parameter.
152
152
kv_creator: A KVCreator object to create external KV storage as
153
153
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
155
155
distribute_strategy: Used when creating ShadowVariable.
156
156
keep_distribution: Bool. If true, save and restore python object with
157
157
devices information. Default is false.
0 commit comments