我已经安装了PyTorch。import torch运行时没有错误。但是,找不到函数torch.repeat_interleave():
x = torch.tensor([1, 2, 3])
x.repeat_interleave(2)提供AttributeError: 'Tensor' object has no attribute 'repeat_interleave'
为什么?
发布于 2020-10-01 18:15:46
torch.repeat_interleave运算符是在pytorch的1.1.0版本中引入的,因此请考虑更新到pytorch的1.1.0+版本以顺利使用此方法。
https://stackoverflow.com/questions/64152866
复制相似问题