Corrections
This commit is contained in:
parent
99f0c8bb20
commit
5ad1cf33b5
|
@ -776,8 +776,8 @@ class SemanticKittiSampler(Sampler):
|
||||||
gen_classes.append(class_indices * 0 + c)
|
gen_classes.append(class_indices * 0 + c)
|
||||||
|
|
||||||
# Update potentials
|
# Update potentials
|
||||||
self.dataset.potentials[class_indices] = np.ceil(self.dataset.potentials[class_indices])
|
self.dataset.potentials[class_indices] = torch.ceil(self.dataset.potentials[class_indices])
|
||||||
self.dataset.potentials[class_indices] += np.random.rand(class_indices.shape[0]) * 0.1 + 0.1
|
self.dataset.potentials[class_indices] += torch.from_numpy(np.random.rand(class_indices.shape[0]) * 0.1 + 0.1)
|
||||||
|
|
||||||
# Stack the chosen indices of all classes
|
# Stack the chosen indices of all classes
|
||||||
gen_indices = torch.cat(gen_indices, dim=0)
|
gen_indices = torch.cat(gen_indices, dim=0)
|
||||||
|
@ -789,8 +789,8 @@ class SemanticKittiSampler(Sampler):
|
||||||
gen_classes = gen_classes[rand_order]
|
gen_classes = gen_classes[rand_order]
|
||||||
|
|
||||||
# Update potentials (Change the order for the next epoch)
|
# Update potentials (Change the order for the next epoch)
|
||||||
self.dataset.potentials[gen_indices] = torch.ceil(self.dataset.potentials[gen_indices])
|
#self.dataset.potentials[gen_indices] = torch.ceil(self.dataset.potentials[gen_indices])
|
||||||
self.dataset.potentials[gen_indices] += torch.from_numpy(np.random.rand(gen_indices.shape[0]) * 0.1 + 0.1)
|
#self.dataset.potentials[gen_indices] += torch.from_numpy(np.random.rand(gen_indices.shape[0]) * 0.1 + 0.1)
|
||||||
|
|
||||||
# Update epoch inds
|
# Update epoch inds
|
||||||
self.dataset.epoch_inds += gen_indices
|
self.dataset.epoch_inds += gen_indices
|
||||||
|
|
Loading…
Reference in a new issue