|
|
@ -13,10 +13,10 @@
|
|
|
|
# limitations under the License.
|
|
|
|
# limitations under the License.
|
|
|
|
import paddle
|
|
|
|
import paddle
|
|
|
|
|
|
|
|
|
|
|
|
from paddlespeech.t2s.modules import expansion
|
|
|
|
# from paddlespeech.t2s.modules import expansion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_expand():
|
|
|
|
def _test_expand():
|
|
|
|
x = paddle.randn([2, 4, 3]) # (B, T, C)
|
|
|
|
x = paddle.randn([2, 4, 3]) # (B, T, C)
|
|
|
|
lengths = paddle.to_tensor([[1, 2, 2, 1], [3, 1, 4, 0]])
|
|
|
|
lengths = paddle.to_tensor([[1, 2, 2, 1], [3, 1, 4, 0]])
|
|
|
|
y = expansion.expand(x, lengths)
|
|
|
|
y = expansion.expand(x, lengths)
|
|
|
|