Skip to content

Commit

Permalink
fix bug of SeqAugmentOps
Browse files Browse the repository at this point in the history
  • Loading branch information
yangxudong committed Sep 10, 2024
1 parent 01f3b16 commit fc0bd57
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion easy_rec/python/layers/keras/custom_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def __init__(self, params, name='sequence_aug', reuse=None, **kwargs):
self.seq_augment = custom_ops.my_seq_augment

def call(self, inputs, training=None, **kwargs):
assert isinstance(inputs, (list, tuple))
assert isinstance(
inputs,
(list, tuple)), 'the inputs of SeqAugmentOps must be type of list/tuple'
assert len(inputs) >= 2, 'SeqAugmentOps must have at least 2 inputs'
seq_input, seq_len = inputs[:2]
embedding_dim = int(seq_input.shape[-1])
with tf.variable_scope(self.name, reuse=self.reuse):
Expand Down

0 comments on commit fc0bd57

Please sign in to comment.