For a point cloud, I can randomly translate it by multiplying it by a 3x3 rotational matrix. Here is my get item function in my Dataloader class:
def __getitem__(self, index):
current = self.mesh_paths[index]
#print("./mesh/"+current)
low = o3d.io.read_point_cloud(self.data_low_dir +current)
high = o3d.io.read_point_cloud(self.data_high_dir+current)
input_pt = torch.from_numpy(np.asarray(low.points))
output_pt = torch.from_numpy(np.asarray(high.points))
return input_pt, output_pt
Without randomly generating my rotation matrix in the getitem function, how would I multiply a new random to a tensor in the getitem function using the torch.transpose method?