memcpy is super slow in cuda kernels....

This commit is contained in:
erikwijmans
2018-01-29 18:22:27 -05:00
parent 009c30e5e3
commit c4ddd6b099
7 changed files with 30 additions and 14 deletions
+3 -2
View File
@@ -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(
+3 -1
View File
@@ -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(