torch.stack()
跟torch.scatter()类似,scatter()请看我的上一篇博客:https://blog.csdn.net/weixin_43496455/article/details/103870889
贴个torch.stack()官方文档的截图
dim代表沿着哪个维度进行堆叠
举个例子:
跟torch.scatter()类似,scatter()请看我的上一篇博客:https://blog.csdn.net/weixin_43496455/article/details/103870889
贴个torch.stack()官方文档的截图
举个例子:
相关文章: