TensorFlow - Help Needed!
I’m working on a TensorFlow tutorial for building a neural network, but I’m stuck at the activation functions part. I keep getting an error, and I can’t figure out what’s wrong. Can anyone help me out? Thanks in advance
# Here's the code snippet where I'm stuck
model = tf.keras.Sequential([
tf.keras.layers.Dense(128, activation='relu'),
tf.keras.layers.Dense(64, activation='relu'),
tf.keras.layers.Dense(10, activation='softmax')
])
model.compile(optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy'])
history = model.fit(train_images, train_labels, epochs=10)