MCPcopy Create free account
hub / github.com/d62lu/3DCTN / shuffle_data

Function shuffle_data

provider.py:22–32  ·  view source on GitHub ↗

Shuffle data and labels. Input: data: B,N,... numpy array label: B,... numpy array Return: shuffled data, label and shuffle indices

(data, labels)

Source from the content-addressed store, hash-verified

20
21
22def shuffle_data(data, labels):
23 """ Shuffle data and labels.
24 Input:
25 data: B,N,... numpy array
26 label: B,... numpy array
27 Return:
28 shuffled data, label and shuffle indices
29 """
30 idx = np.arange(len(labels))
31 np.random.shuffle(idx)
32 return data[idx, ...], labels[idx], idx
33
34def shuffle_points(batch_data):
35 """ Shuffle orders of points in each point cloud -- changes FPS behavior.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected