-
Notifications
You must be signed in to change notification settings - Fork 126
Description
Problem:
The integration of session-based support in Merlin Models requires the implementation/refractory of different blocks. (Ticket #433 summarizes the motivation and an overview of all the requirements).
Goal:
- Implement the first low-level support of a session-based model using RNNs.
- This work will include different blocks needed for session-based but won't link them together.
Constraints:
Starting Point:
- First implementation of Masking as an augmentation technique, and the creation of related unit tests.
[FEA] Design doc for the masking block models#509
[Task] Target generation for Youtube-DNN retrieval model models#540
Notes:
- We will include the three approaches: Last, Random, and sliding window (CLM)
- Use the UniformNegativeSampling code as a starting point
- This is a standalone class that transforms the inputs and returns a PredictionOutput object with (inputs, targets, and mask)
-
Support of SequenceAggregator operations (
to-2dtransformation) using ragged tensors: Ignore masking, Average, Weighted-average, Attention-based average. And the creation of related unit tests.
Notes: We should keep the ragged representation in the input blocks and transform it to a dense representation only when forwarding the sequence to the RNN block.
Decoupling of InputBlock(v2) and Embedding Tables, support to Ragged Embeddings Lookup and AverageEmbeddingsByWeightFeature models#593 -
Support of an RNN block built on top of tf.keras layers:
rnn,gruandlstm. And the creation of related unit tests.
Notes: The block should return either a 2-D representation of the whole sequence or a 3-D representation with all positions. - Dropped as one can directly use tf.keras.layers.LSTM with other MM blocks. -
Example of RNN session-based recommendation training and deployment