From 01f3b16b8f5e54dcebc5e5523c27b3877283207a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=AB=E8=8B=8F?= Date: Tue, 10 Sep 2024 18:00:31 +0800 Subject: [PATCH] fix bug of SeqAugmentOps --- easy_rec/python/layers/keras/custom_ops.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easy_rec/python/layers/keras/custom_ops.py b/easy_rec/python/layers/keras/custom_ops.py index 90beed716..37367d1b8 100644 --- a/easy_rec/python/layers/keras/custom_ops.py +++ b/easy_rec/python/layers/keras/custom_ops.py @@ -54,6 +54,7 @@ def call(self, inputs, training=None, **kwargs): with tf.variable_scope(self.name, reuse=self.reuse): mask_emb = tf.get_variable( 'mask', (embedding_dim,), dtype=tf.float32, trainable=True) + seq_len = tf.to_int32(seq_len) aug_seq, aug_len = self.seq_augment(seq_input, seq_len, mask_emb, self.seq_aug_params.crop_rate, self.seq_aug_params.reorder_rate,