From 20af9060ddd7eeb481899c9d513e2e5be06e3db9 Mon Sep 17 00:00:00 2001 From: wassname Date: Tue, 10 Apr 2018 11:46:28 +0800 Subject: [PATCH] fix tests --- data/ModelNet40Loader.py | 2 +- utils/pointnet2_modules.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/ModelNet40Loader.py b/data/ModelNet40Loader.py index 150d09b..45222f3 100644 --- a/data/ModelNet40Loader.py +++ b/data/ModelNet40Loader.py @@ -98,7 +98,7 @@ if __name__ == "__main__": transforms = transforms.Compose([ d_utils.PointcloudToTensor(), - d_utils.PointcloudRotate(x_axis=True), + d_utils.PointcloudRotate(axis=np.array([1,0,0])), d_utils.PointcloudScale(), d_utils.PointcloudTranslate(), d_utils.PointcloudJitter() diff --git a/utils/pointnet2_modules.py b/utils/pointnet2_modules.py index 040805e..bce9154 100644 --- a/utils/pointnet2_modules.py +++ b/utils/pointnet2_modules.py @@ -214,8 +214,8 @@ if __name__ == "__main__": from torch.autograd import Variable torch.manual_seed(1) torch.cuda.manual_seed_all(1) - xyz = Variable(torch.randn(2, 10, 3).cuda(), requires_grad=True) - xyz_feats = Variable(torch.randn(2, 10, 6).cuda(), requires_grad=True) + xyz = Variable(torch.randn(2, 9, 3).cuda(), requires_grad=True) + xyz_feats = Variable(torch.randn(2, 9, 6).cuda(), requires_grad=True) test_module = PointnetSAModuleMSG( npoint=2, radii=[5.0, 10.0], nsamples=[6, 3], mlps=[[9, 3], [9, 6]]