From 98915e18efe264cb93c39871db48521cee362a8c Mon Sep 17 00:00:00 2001 From: siyerp <112425790+siyerp@users.noreply.github.com> Date: Wed, 14 Aug 2024 21:05:05 -0400 Subject: [PATCH 1/3] specified keyword arguments as per updated requirements - subramanian iyer --- recommenders/models/sasrec/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recommenders/models/sasrec/model.py b/recommenders/models/sasrec/model.py index 4ac6fa93d..26d3496ef 100644 --- a/recommenders/models/sasrec/model.py +++ b/recommenders/models/sasrec/model.py @@ -313,7 +313,7 @@ def call(self, x, training, mask): """ for i in range(self.num_layers): - x = self.enc_layers[i](x, training, mask) + x = self.enc_layers[i](x, training=training, mask=mask) return x # (batch_size, input_seq_len, d_model) From 0296e95635e5807a871cbc5752755257c7396d83 Mon Sep 17 00:00:00 2001 From: siyerp <112425790+siyerp@users.noreply.github.com> Date: Wed, 14 Aug 2024 21:11:58 -0400 Subject: [PATCH 2/3] Update model.py Corrected docstring --- recommenders/models/sasrec/model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recommenders/models/sasrec/model.py b/recommenders/models/sasrec/model.py index 26d3496ef..1550cfd1f 100644 --- a/recommenders/models/sasrec/model.py +++ b/recommenders/models/sasrec/model.py @@ -240,7 +240,7 @@ def call(self, x, training, mask): Args: x (tf.Tensor): Input tensor. - training (tf.Tensor): Training tensor. + training (Boolean): True if in training mode. mask (tf.Tensor): Mask tensor. Returns: @@ -305,7 +305,7 @@ def call(self, x, training, mask): Args: x (tf.Tensor): Input tensor. - training (tf.Tensor): Training tensor. + training (Boolean): True if in training mode. mask (tf.Tensor): Mask tensor. Returns: From 551ec31b8e3d2a163e72ad8570c0323bc865907f Mon Sep 17 00:00:00 2001 From: siyerp <112425790+siyerp@users.noreply.github.com> Date: Wed, 14 Aug 2024 21:30:25 -0400 Subject: [PATCH 3/3] Changed function signatures to comply with updated tensorflow requirements. -Subramanian Iyer --- recommenders/models/sasrec/ssept.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recommenders/models/sasrec/ssept.py b/recommenders/models/sasrec/ssept.py index dbf7abdce..15da43082 100644 --- a/recommenders/models/sasrec/ssept.py +++ b/recommenders/models/sasrec/ssept.py @@ -122,7 +122,7 @@ def call(self, x, training): # --- ATTENTION BLOCKS --- seq_attention = seq_embeddings # (b, s, h1 + h2) - seq_attention = self.encoder(seq_attention, training, mask) + seq_attention = self.encoder(seq_attention, training=training, mask=mask) seq_attention = self.layer_normalization(seq_attention) # (b, s, h1+h2) # --- PREDICTION LAYER --- @@ -197,7 +197,7 @@ def predict(self, inputs): seq_embeddings *= mask seq_attention = seq_embeddings - seq_attention = self.encoder(seq_attention, training, mask) + seq_attention = self.encoder(seq_attention, training=training, mask=mask) seq_attention = self.layer_normalization(seq_attention) # (b, s, h1+h2) seq_emb = tf.reshape( seq_attention,