Lingxmeteor 2019-10-15 20:59 采纳率: 0%
浏览 2212

Linux+pytorch下运行报错RuntimeError: PyTorch was compiled without NumPy support

我在尝试实现Github上开源的代码Relation-Shape-CNN,运行报错RuntimeError: PyTorch was compiled without NumPy support

train_cls.py:36: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
config = yaml.load(f)


[checkpoint]:


/media/lab/16DE307A392D4AED/zs/Relation-Shape-CNN/models/../utils/pointnet2_modules.py:113: UserWarning: nn.init.kaiming_normal is now deprecated in favor of nn.init.kaiming_normal_.
init(xyz_raising.weight)
/media/lab/16DE307A392D4AED/zs/Relation-Shape-CNN/models/../utils/pointnet2_modules.py:115: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
nn.init.constant(xyz_raising.bias, 0)
/media/lab/16DE307A392D4AED/zs/Relation-Shape-CNN/models/../utils/pointnet2_modules.py:122: UserWarning: nn.init.kaiming_normal is now deprecated in favor of nn.init.kaiming_normal_.
init(mapping_func1.weight)
/media/lab/16DE307A392D4AED/zs/Relation-Shape-CNN/models/../utils/pointnet2_modules.py:123: UserWarning: nn.init.kaiming_normal is now deprecated in favor of nn.init.kaiming_normal_.
init(mapping_func2.weight)
/media/lab/16DE307A392D4AED/zs/Relation-Shape-CNN/models/../utils/pointnet2_modules.py:125: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
nn.init.constant(mapping_func1.bias, 0)
/media/lab/16DE307A392D4AED/zs/Relation-Shape-CNN/models/../utils/pointnet2_modules.py:126: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
nn.init.constant(mapping_func2.bias, 0)
/media/lab/16DE307A392D4AED/zs/Relation-Shape-CNN/models/../utils/pointnet2_modules.py:131: UserWarning: nn.init.kaiming_normal is now deprecated in favor of nn.init.kaiming_normal_.
init(cr_mapping.weight)
/media/lab/16DE307A392D4AED/zs/Relation-Shape-CNN/models/../utils/pointnet2_modules.py:132: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
nn.init.constant(cr_mapping.bias, 0)
/media/lab/16DE307A392D4AED/zs/Relation-Shape-CNN/models/../utils/pytorch_utils/pytorch_utils.py:153: UserWarning: nn.init.kaiming_normal is now deprecated in favor of nn.init.kaiming_normal_.
init(self.conv_avg.weight)
/media/lab/16DE307A392D4AED/zs/Relation-Shape-CNN/models/../utils/pytorch_utils/pytorch_utils.py:155: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
nn.init.constant(self.conv_avg.bias, 0)
/media/lab/16DE307A392D4AED/zs/Relation-Shape-CNN/models/../utils/pytorch_utils/pytorch_utils.py:201: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
nn.init.constant(self[0].weight, 1.0)
/media/lab/16DE307A392D4AED/zs/Relation-Shape-CNN/models/../utils/pytorch_utils/pytorch_utils.py:202: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
nn.init.constant(self[0].bias, 0)
/media/lab/16DE307A392D4AED/zs/Relation-Shape-CNN/models/../utils/pytorch_utils/pytorch_utils.py:400: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
nn.init.constant(fc.bias, 0)
Traceback (most recent call last):
File "train_cls.py", line 167, in
main()
File "train_cls.py", line 91, in main
train(train_dataloader, test_dataloader, model, criterion, optimizer, lr_scheduler, bnm_scheduler, args, num_batch)
File "train_cls.py", line 101, in train
for i, data in enumerate(train_dataloader, 0):
File "/home/lab/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 336, in next
return self._process_next_batch(batch)
File "/home/lab/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 357, in process_next_batch
raise batch.exc_type(batch.exc_msg)
RuntimeError: Traceback (most recent call last):
File "/home/lab/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/lab/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 106, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/media/lab/16DE307A392D4AED/zs/Relation-Shape-CNN/data/ModelNet40Loader.py", line 55, in __getitem
_
label = torch.from_numpy(self.labels[idx]).type(torch.LongTensor)
RuntimeError: PyTorch was compiled without NumPy support

请大神解答!!!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥30 这是哪个作者做的宝宝起名网站
    • ¥60 版本过低apk如何修改可以兼容新的安卓系统
    • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
    • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
    • ¥50 有数据,怎么用matlab求全要素生产率
    • ¥15 TI的insta-spin例程
    • ¥15 完成下列问题完成下列问题
    • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
    • ¥15 YoloV5 第三方库的版本对照问题
    • ¥15 请完成下列相关问题!