PSMNET deubg

1.

       imgL = np.reshape(imgL,[1,3,imgL.shape[1],imgL.shape[2]])
       imgR = np.reshape(imgR,[1,3,imgR.shape[1],imgR.shape[2]])

       print('size0=%d' %(imgL.shape[0]))
       print('size1=%d' %(imgL.shape[1]))
       print('size2=%d' %(imgL.shape[2]))
       print('size3=%d' %(imgL.shape[3]))

 

size0=1
size1=3
size2=375
size3=1242

 

 

       print('test size0=%d' %(imgL.shape[0]))
       print('test size1=%d' %(imgL.shape[1]))
       print('test size2=%d' %(imgL.shape[2]))
       print('test size3=%d' %(imgL.shape[3]))
       pred_disp = test(imgL,imgR)

test size0=1
test size1=3
test size2=384
test size3=1248

 

imgL22 = np.reshape(imgL,[imgL.shape[2],imgL.shape[3],3])
skimage.io.imsave('/b/left14444.jpg',(imgL22*256).astype('uint16'))

2.

# if args.cuda:
        #    imgL = torch.FloatTensor(imgL).cuda()
        #    imgR = torch.FloatTensor(imgR).cuda()     
        imgL = torch.FloatTensor(imgL)# add
        imgR = torch.FloatTensor(imgR)# add
        imgL, imgR= Variable(imgL), Variable(imgR)

测试可以通过

新的问题:

 cost = Variable(torch.FloatTensor(refimg_fea.size()[0], refimg_fea.size()[1]*2, self.maxdisp/4,  refimg_fea.size()[2],  refimg_fea.size()[3]).zero_(), volatile= not self.training).cuda()
RuntimeError: Cannot initialize CUDA without ATen_cuda library. PyTorch splits its backend into two shared libraries: a CPU library and a CUDA library; this error has occurred because you are trying to use some CUDA functionality, but the CUDA library has not been loaded by the dynamic linker for some reason.  The CUDA library MUST be loaded, EVEN IF you don't directly use any symbols from the CUDA library! One common culprit is a lack of -Wl,--no-as-needed in your link arguments; many dynamic linkers will delete dynamic library dependencies if you don't depend on any of their symbols.  You can check if this has occurred by using ldd on your binary to see if there is a dependency on *_cuda.so library.

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值