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,