Question: Using: # Create a sequential Keras model where each layer is automatically connected to the previous layer model = keras.models.Sequential() model.add(keras.layers.Flatten(input_shape=[28, 28])) # Define the

Using: # Create a sequential Keras model where each layer is automatically connected to the previous layer model = keras.models.Sequential() model.add(keras.layers.Flatten(input_shape=[28, 28])) # Define the input layer reading in the 28x28 pixel images model.add(keras.layers.Dense(50, activation="relu")) # Define a hidden layer of 300 units. model.add(keras.layers.Dense(50, activation="relu")) # Define a second hidden layer of 100 units. model.add(keras.layers.Dense(10, activation="softmax")) # Use softmax for mutli-catagory classification output for 10 different classes

print ("Neural Network created") model.summary()

Why is the input size or dimension set to [28 ,28]? Is this dependent on the data?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!