当我运行python main_test.py --model_type 3class的时候,出现下面的问题:
/mnt/f/code/PointNetGPD/PointNetGPD
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.parallel.data_parallel.DataParallel' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'model.pointnet.PointNetCls' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'model.pointnet.PointNetfeat' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'model.pointnet.STN3d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.conv.Conv1d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.MaxPool1d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.linear.Linear' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.activation.ReLU' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm1d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
load model ../data/pointnetgpd_3class.model
voting: [tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0])]
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/scipy/stats/stats.py:249: FutureWarning: The input object of type 'Tensor' is an array-like implementing one of the corresponding protocols (__array__, __array_interface__ or __array_struct__); but not a sequence (or 0-D). In the future, this object will be coerced as if it was first converted using np.array(obj). To retain the old behaviour, you have to either modify the type 'Tensor', or assign to an empty array created with np.empty(correct_shape, dtype=object).
a = np.asarray(a)
/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/scipy/stats/stats.py:249: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
a = np.asarray(a)
Test result: tensor([0])
我改过一些代码,请问下有谁知道这是什么原因导致的,应该怎么解决呢?
当我运行python main_test.py --model_type 3class的时候,出现下面的问题: /mnt/f/code/PointNetGPD/PointNetGPD /home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.parallel.data_parallel.DataParallel' has changed. you can retrieve the original source code by accessing the object's source attribute or set
torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'model.pointnet.PointNetCls' has changed. you can retrieve the original source code by accessing the object's source attribute or settorch.nn.Module.dump_patches = True
and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'model.pointnet.PointNetfeat' has changed. you can retrieve the original source code by accessing the object's source attribute or settorch.nn.Module.dump_patches = True
and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'model.pointnet.STN3d' has changed. you can retrieve the original source code by accessing the object's source attribute or settorch.nn.Module.dump_patches = True
and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.conv.Conv1d' has changed. you can retrieve the original source code by accessing the object's source attribute or settorch.nn.Module.dump_patches = True
and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.MaxPool1d' has changed. you can retrieve the original source code by accessing the object's source attribute or settorch.nn.Module.dump_patches = True
and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.linear.Linear' has changed. you can retrieve the original source code by accessing the object's source attribute or settorch.nn.Module.dump_patches = True
and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.activation.ReLU' has changed. you can retrieve the original source code by accessing the object's source attribute or settorch.nn.Module.dump_patches = True
and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm1d' has changed. you can retrieve the original source code by accessing the object's source attribute or settorch.nn.Module.dump_patches = True
and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) load model ../data/pointnetgpd_3class.model voting: [tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0]), tensor([0])] /home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/scipy/stats/stats.py:249: FutureWarning: The input object of type 'Tensor' is an array-like implementing one of the corresponding protocols (__array__
,__array_interface__
or__array_struct__
); but not a sequence (or 0-D). In the future, this object will be coerced as if it was first converted usingnp.array(obj)
. To retain the old behaviour, you have to either modify the type 'Tensor', or assign to an empty array created withnp.empty(correct_shape, dtype=object)
. a = np.asarray(a) /home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/scipy/stats/stats.py:249: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray. a = np.asarray(a) Test result: tensor([0]) 我改过一些代码,请问下有谁知道这是什么原因导致的,应该怎么解决呢?