Shuffle data and labels. Input: data: B,N,... numpy array label: B,... numpy array Return: shuffled data, label and shuffle indices
(data, labels)
| 20 | |
| 21 | |
| 22 | def 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 | |
| 34 | def shuffle_points(batch_data): |
| 35 | """ Shuffle orders of points in each point cloud -- changes FPS behavior. |
nothing calls this directly
no outgoing calls
no test coverage detected