Skip to content

Commit e8e6bf5

Browse files
Implementing Sara's suggestions on pretrained embeddings
1 parent 993e4c8 commit e8e6bf5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

merlin/models/tf/inputs/embedding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ def PretrainedEmbeddings(
664664
aggregation: Optional[TabularAggregationType], optional
665665
Transformation block to apply for aggregating the inputs, by default None
666666
block_name: str, optional
667-
Name of the block, by default "embeddings"
667+
Name of the block, by default "pretrained_embeddings"
668668
Returns
669669
-------
670670
ParallelBlock
@@ -1339,7 +1339,7 @@ def process_str_sequence_combiner(
13391339
combiner = tf.keras.layers.Lambda(lambda x: tf.reduce_max(x, axis=1))
13401340
else:
13411341
raise ValueError(
1342-
"Only 'mean' and 'sum' str combiners is implemented for dense"
1342+
"Only 'mean', 'sum', and 'max' str combiners is implemented for dense"
13431343
" list/multi-hot embedded features. You can also"
13441344
" provide a tf.keras.layers.Layer instance as a sequence combiner."
13451345
)

merlin/models/tf/transforms/regularization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def call(self, inputs: Union[tf.Tensor, TabularData], axis: int = -1, **kwargs):
3434
if isinstance(inputs, dict):
3535
inputs = {key: self._l2_norm(inp, axis=axis) for key, inp in inputs.items()}
3636
else:
37-
inputs = self._l2_norm(inputs)
37+
inputs = self._l2_norm(inputs, axis=axis)
3838

3939
return inputs
4040

0 commit comments

Comments
 (0)