@@ -510,8 +510,8 @@ def varlength_concat(x, y, x_length, dtype=None, tensor_rank=None):
510
510
# out = [[1, 1, 2, 2, 0, 0, 0]
511
511
# [1, 1, 1, 2, 2, 2, 0]]
512
512
"""
513
- # x = tf.convert_to_tensor(x)
514
- # y = tf.convert_to_tensor(y)
513
+ x = tf .convert_to_tensor (x )
514
+ y = tf .convert_to_tensor (y )
515
515
x_length = tf .convert_to_tensor (x_length )
516
516
517
517
if tensor_rank is None :
@@ -588,7 +588,7 @@ def varlength_concat_py(x, y, x_length, dtype=None):
588
588
y = np.asarray([[2, 2, 0],
589
589
[2, 2, 2]])
590
590
591
- out = varlength_concat (x, y, x_length)
591
+ out = varlength_concat_py (x, y, x_length)
592
592
# out = [[1, 1, 2, 2, 0, 0, 0]
593
593
# [1, 1, 1, 2, 2, 2, 0]]
594
594
"""
@@ -662,8 +662,8 @@ def varlength_roll(input, shift, axis=1, dtype=None):
662
662
# out = [[4, 1, 2, 3]
663
663
# [6, 7, 8, 5]]
664
664
"""
665
- # x = tf.convert_to_tensor(input)
666
- x = input
665
+ x = tf .convert_to_tensor (input )
666
+ # x = input
667
667
shift = tf .convert_to_tensor (shift )
668
668
669
669
batch_size = tf .shape (x )[0 ]
0 commit comments