mirror of
https://github.com/wassname/Pointnet2_PyTorch.git
synced 2026-06-27 16:00:07 +08:00
memcpy is super slow in cuda kernels....
This commit is contained in:
@@ -5,7 +5,8 @@ import os, sys, h5py, subprocess, shlex
|
||||
|
||||
|
||||
def _get_data_files(list_filename):
|
||||
return [line.rstrip() for line in open(list_filename)]
|
||||
with open(list_filename) as f:
|
||||
return [line.rstrip() for line in f]
|
||||
|
||||
|
||||
def _load_data_file(name):
|
||||
@@ -76,7 +77,7 @@ class Indoor3DSemSeg(data.Dataset):
|
||||
pt_idxs = np.arange(0, self.num_points)
|
||||
np.random.shuffle(pt_idxs)
|
||||
|
||||
current_points = torch.from_numpy(self.points[idx, pt_idxs, :]).type(
|
||||
current_points = torch.from_numpy(self.points[idx, pt_idxs]).type(
|
||||
torch.FloatTensor
|
||||
)
|
||||
current_labels = torch.from_numpy(self.labels[idx, pt_idxs]).type(
|
||||
|
||||
@@ -8,7 +8,8 @@ sys.path.append(BASE_DIR)
|
||||
|
||||
|
||||
def _get_data_files(list_filename):
|
||||
return [line.rstrip()[5:] for line in open(list_filename)]
|
||||
with open(list_filename) as f:
|
||||
return [line.rstrip()[5:] for line in f]
|
||||
|
||||
|
||||
def _load_data_file(name):
|
||||
@@ -80,6 +81,7 @@ class ModelNet40Cls(data.Dataset):
|
||||
|
||||
def set_num_points(self, pts):
|
||||
self.num_points = pts
|
||||
self.actual_number_of_points = pts
|
||||
|
||||
def randomize(self):
|
||||
self.actual_number_of_points = min(
|
||||
|
||||
Reference in New Issue
Block a user