MCPcopy Create free account
hub / github.com/easy-tensorflow/easy-tensorflow / randomize

Function randomize

3_Neural_Network/code/utils.py:22–27  ·  view source on GitHub ↗

Randomizes the order of data samples and their corresponding labels

(x, y)

Source from the content-addressed store, hash-verified

20
21
22def randomize(x, y):
23 """ Randomizes the order of data samples and their corresponding labels"""
24 permutation = np.random.permutation(y.shape[0])
25 shuffled_x = x[permutation, :]
26 shuffled_y = y[permutation]
27 return shuffled_x, shuffled_y
28
29
30def get_next_batch(x, y, start, end):

Callers 1

main.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected