CNN result replication on tensorflow I am trying to replicate the first Sequential example in this video:
https://www.youtube.com/watch?v=WAciKiDP2bo
using the following code
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.keras.datasets import cifar10

(x_train, y_train), (x_test, y_test) = cifar10.load_data()
x_train = x_train.astype('float32')/255
y_train = y_train.astype('float32')/255

# Sequential model
model = keras.Sequential(
    [
        keras.Input(shape=(32, 32, 3)),
        layers.Conv2D(32, 3, padding='valid', activation='relu'), # 'same'
        layers.MaxPooling2D(pool_size=(2,2)),
        layers.Conv2D(64, 3, activation='relu'),
        layers.MaxPooling2D(),
        layers.Conv2D(128, 3, activation='relu'),
        layers.Flatten(),
        layers.Dense(64, activation='relu'),
        layers.Dense(10),
    ]
)
model.summary()

model.compile(
    loss = keras.losses.SparseCategoricalCrossentropy(from_logits=True),
    optimizer = keras.optimizers.Adam(lr=3e-4),
    metrics=['accuracy']
)

model.fit(x_train, y_train, batch_size=64, epochs=10, verbose=2)

model.evaluate(x_test, y_test, batch_size=64, verbose=2)

The accuracy I get is 0.1 vs 0.7 which the author shows in the video. Could somebody point me to the issue with the code, my computer config etc?

It's cause your line "y_train = y_train/255" should be "x_test = x_test / 255". It doesn't make sense to scale the y labels; what the division by 255 accomplishes is scaling the RGB values of our input images (in x_train/x_test) from between 0-255 to between 0-1, which is more in line with what neural net initializations expect.
Check timestamp 3:36 of the video for confirmation.
