You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it will use the default name "vlen" for values, and "llen", "lofs" if variable length.
212
213
A passed-in dynamic dim is useful if the dynamic dim is already used in other places.
213
214
215
+
variable batch size means the batch size is dynamic during different training iterations
216
+
the batch size for all features are the same within one iteration/batch. so it still follows
217
+
the correlation: len(lengths) == len(keys) * batch_size
218
+
219
+
in the variable length scenario, the batch size could be different for each feature within
220
+
the iteration/batch, so it doesn't follow the correlation: len(lengths) == len(keys) * batch_size
221
+
214
222
Args:
215
223
kjt (KeyedJaggedTensor): The KJT to make dynamic.
216
224
shapes_collection (Optional[ShapesCollection]): The collection to update.
217
-
variable_length (bool): Whether the KJT is variable length.
225
+
variable_length (bool): Whether the KJT is variable length len(lengths) != len(keys) * batch_size
226
+
variable_batch (bool): Whether the KJT is variable batch size, len(lengths) == len(keys) * batch_size, it only works when variable_length is False.
218
227
vlen (Optional[DIM]): The dynamic length for the values. If it's None, it will use the default name "vlen".
219
228
llen (Optional[DIM]): The dynamic length for the lengths, it's only used when variable_length is true. If it's None, it will use the default name "llen".
220
229
batch_size (Optional[DIM]): The dynamic length for the batch_size, it's only used when variable_length and mark_batch_size are both true.
0 commit comments