paddle是否提供了如torch.repeat_interleave和numpy.repeat这样的api。实现的功能如下所示:
y = torch.tensor([[1, 2], [3, 4]])
torch.repeat_interleave(y, 3, dim=1)
# tensor([[1, 1, 1, 2, 2, 2],[3, 3, 3, 4, 4, 4]])
如果没有,在前向传播过程中,是否可以将其转换成numpy,使用numpy的repeat,然后转换成tensor,这样会影响反向传播吗
如a -> b -> c,现在变成a -> b -->b_numpy-->b_tensor->c,这样会影响反向传播吗
3条答案
按热度按时间hec6srdp1#
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档、常见问题、历史Issue、AI社区来寻求解答。祝您生活愉快~
Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the API,FAQ,Github Issue and AI community to get the answer.Have a nice day!
ttisahbt2#
qzlgjiam3#
好的,谢谢解答