Skip to content

Instantly share code, notes, and snippets.

@KananMahammadli
Created August 21, 2021 12:30
Show Gist options
  • Save KananMahammadli/b474cdc94f8860f1fd5e27477d5e19db to your computer and use it in GitHub Desktop.
Save KananMahammadli/b474cdc94f8860f1fd5e27477d5e19db to your computer and use it in GitHub Desktop.
# Function to convert binary label into text
def get_label(num):
if num == 0:
return 'NOT FALL'
if num == 1:
return 'FALL'
else:
return -1
fig, axes = plt.subplots(1, 2, figsize=(10, 8), squeeze=False)
axes[0][0].imshow(train_images[2])
axes[0][0].set_title(get_label(train_labels[2]))
axes[0][1].imshow(train_images[3])
axes[0][1].set_title(get_label(train_labels[3]));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment