本文主要是介绍ValueError: some of the strides of a given numpy array are negative. This is currently not supported,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
ValueError: some of the strides of a given numpy array are negative. This is currently not supported, but will be added in future releases.
Pytorch0.4
问题:
ValueError: some of the strides of a given numpy array are negative. This is currently not supported, but will be added in future releases.
pfmS, scaleLS = rp.readPFM('/data/SceneFlow/driving_disparity/15mm_focallength/scene_backwards/slow/left/0001.pfm')
disp_LS = Variable(torch.FloatTensor(pfmS))
解决办法:
pfmS, scaleLS = rp.readPFM('/data/SceneFlow/driving_disparity/15mm_focallength/scene_backwards/slow/left/0001.pfm')
pfmS = np.ascontiguousarray(pfmS,dtype=np.float32)
disp_LS = Variable(torch.FloatTensor(pfmS))
这篇关于ValueError: some of the strides of a given numpy array are negative. This is currently not supported的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!