Skip to content

Instantly share code, notes, and snippets.

@ashunigion
Created January 26, 2019 06:35
Show Gist options
  • Save ashunigion/f2abd7dc1ee2a25aa77734d697c23f3c to your computer and use it in GitHub Desktop.
Save ashunigion/f2abd7dc1ee2a25aa77734d697c23f3c to your computer and use it in GitHub Desktop.
# generating the labels for prototyped training data
sample_0_labels = np.full((10,), 0)
sample_1_labels = np.full((10,), 1)
# similarly intermediate labels can be generated
# ...
sample_9_labels = np.full((10,), 9)
# stacking the labels into a single array
proto_labels = np.concatenate((sample_0_labels,sample_1_labels,
sample_2_labels,sample_3_labels,
sample_4_labels,sample_5_labels,
sample_6_labels,sample_7_labels,
sample_8_labels,sample_9_labels),
axis = 0
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment