How long does it typically take to train a MNIST data on a Mac Pro?
My code is below:
# define a simple CNN model
def baseline_model():
# create model
model = Sequential()
model.add(Conv2D(30, (5, 5), input_shape=(1, 28, 28), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Conv2D(15, (3, 3), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Dropout(0.2))
model.add(Flatten())
model.add(Dense(128, activation='relu'))
model.add(Dense(50, activation='relu'))
model.add(Dense(num_classes, activation='softmax'))
# Compile model
model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])
return model
# build the model
model = baseline_model()
# Fit the model
model.fit(X_train, y_train, validation_data=(X_test, y_test), epochs=500, batch_size=200)
# Final evaluation of the model
scores = model.evaluate(X_test, y_test, verbose=0)
My Mac's capacity:
Grphics Radeon Pro 555 2048 MB
Intel HD Graphics 630 1536 MB
Memeory 16 GB 2133 MHz LPDDR3
Processor 2.8 GHz Intel Core i7
It is taking several hours to train this the MNIST image classification dataset on my computer. Is this normal?
Category Data Science