(1)问题:在windows下复现PointRCNN时出现
error LNK2001: 无法解析的外部符号 "public: long * __cdecl at::TensorBase::data_ptr<long>(void)const " (??$data_ptr@J@TensorBase@at@@QEBAPEAJXZ)
build\lib.win-amd64-cpython-39\iou3d_cuda.cp39-win_amd64.pyd : fatal error LNK1120: 1 个无法解析的外部命令
解决:
第一步:在对应头文件里加入:#include <cstdint>
第二步:将long替换成int64_t,将unsigned long long 替换成uint64_t
(2)问题:在windows下复现PointRCNN时出现
src/iou3d.cpp(102): error C2131: 表达式的计算结果不是常数
解决:
将uint64_t remv_cpu[col_blocks] 替换成
uint64_t *remv_cpu = new uint64_t [col_blocks];
(3) 问题:error C3861: “AT_CHECK”: 找不到标识符
error C3861: “THCState_getCurrentStream”: 找不到标识符
解决:将AT_CHECK替换成TORCH_CHECK
将THCState_getCurrentStream(state)替换成c10::cuda::getCurrentCUDAStream()
(4)问题: while cur_gt[k].sum() == 0:
解决:参考OpenPCDet/pcdet/models/roi_heads/target_assigner/proposal_target_layer.py
在proposal_target_layer.py文件中,
将 while cur_gt[k].sum() == 0: 替换成while k>=0 and cur_gt[k].sum() == 0:
在加上cur_gt = cur_gt.new_zeros((1, cur_gt.shape[1])) if len(cur_gt) == 0 else cur_gt
(5)
import tensorflow as tf 替换成
import tensorflow._api.v2.compat.v1 as tf
tf.disable_v2_behavior()
(6) h5py错误
File "h5py\_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py\h5f.pyx", line 106, in h5py.h5f.open
方案:
将h5_fout = h5py.File(h5_filename)替换成 h5_fout = h5py.File(str(h5_filename),'w')
参考:Missing file error message misleadingly turned to lowercase · Issue #854 · h5py/h5py · GitHub
(6)tensorflow 出现问题:AttributeError: module 'tf' has no attribute 'contrib'
解决:
将initializer = tf.contrib.layers.xavier_initializer()
替换成
initializer = tf.compat.v1.keras.initializers.VarianceScaling(scale=1.0, mode="fan_avg", distribution="uniform")