Q:RuntimeError: the given numpy array has zero-sized dimensions. Zero-sized dimensions are not supported in PyTorch
A:在pytorch 0.3
版本中是不支持0维的,会出错.在pytorch 0.4
版本中解决了这个问题.但目前只能源码编译安装.conda
或pip
的安装方式官方还未给出.
验证版本命令:
>>> import torch
>>> print(torch.__version__)
0.4.0a0+2ef23b6
测试cuda:
torch.cuda.is_available()
________分割线________
目前pytorch
官方已经推出0.4版本了!