AttributeError: module ‘torch‘ has no attribute ‘concat‘

    如图上所示报错地方

在跑算法代码的时候,发现报错,但是这个错误在网上没有找到,我推测是pytorch改版问题,于是查看torch版本改动,发现torch.concat改版后该写为torch.cat。不过或许我写的也不够准确,除此之外还看到了有人问torch.concat和torch.cat的区别。

    不过出现了这类问题改成torch.cat试试看吧。

猜你喜欢

转载自blog.csdn.net/Job_class/article/details/129972693
今日推荐