<jupyter_start><jupyter_text>importing data<jupyter_code>from keras.datasets import cifar10
(x_train, y_train), (x_test, y_test) = cifar10.load_data()
print("x_train shape: ",x_train.shape)
print("y_train shape: ",y_train.shape)
print("x_test shape: ",x_test.shape)
print("y_test shape: ",y_test.shape)
print(type(x_train))<jupyter_output><class 'numpy.ndarray'><jupyter_text>visualising an image<jupyter_code>import matplotlib.pyplot as plt
import time
import os
from IPython.display import clear_output
for x in range(10):
    print("here")
    plt.imshow(x_train[x])
    plt.show()
    time.sleep(0.5)
    clear_output(wait=True)<jupyter_output>here<jupyter_text>labels - y0 = airplane1 = automobile2 = bird3 = cat4 = deer5 = dog6 = frog7 = horse8 = ship9 = truck<jupyter_code>print('The label is:', y_train[0])<jupyter_output>The label is: [6]<jupyter_text>we convert this 6 into an array of 10 numbers in with the 6th index is 1 others are 0.we do this using to_categorical of keras.utils lib<jupyter_code>#One-Hot Encoding 
#Convert the labels into a set of 10 numbers to input into the neural network
from keras.utils import to_categorical
y_train_one_hot = to_categorical(y_train)
y_test_one_hot = to_categorical(y_test)
y_train_one_hot[0]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10728269381362568, 'fraction_numerical': 0.022709475332811275, 'mean_word_length': 6.652694610778443, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '25478', 'license': 'MIT', 'n_tokens_mistral': 500, 'n_tokens_neox': 484, 'n_words': 114, 'path': 'youtube randerson/Untitled.ipynb', 'repo_name': 'xo28122000/image_recognition', 'size': '1277'}