Python Code Load MNIST data and scale it: fashion_mnist = keras.datasets.fashion_mnist (X_train_full, y_train_full), (X_test, y_test) = fashion_mnist.load_data() X_valid, X_train = X_train_full[:5000] / 255., X_train_full[5000:] / 255. y_valid, y_train = y_train_full[:5000], y_train_full[5000:] X_test = X_test / 255. keras.backend.clear_session() np.random.seed(42) tf.random.set_seed(42) a: Estimate a neural network with epochs =20 and one hidden layer with 400 neurons. Measure and report validation accuracy and estimation time.Explain your results. If needed, explain which additional algorithm or extra assumption you used for your answer. b: With the same data build a model with two hidden layers [150, 70, 30] neurons. Create two outputs: prediction of a each digit and the prediction of even/odd. Give equal probabibility to each output. If needed, explain which additional algorithm or extra assumption you used for your answer.
I need Python Code
Load MNIST data and scale it: fashion_mnist = keras.datasets.fashion_mnist (X_train_full, y_train_full), (X_test, y_test) = fashion_mnist.load_data() X_valid, X_train = X_train_full[:5000] / 255., X_train_full[5000:] / 255. y_valid, y_train = y_train_full[:5000], y_train_full[5000:] X_test = X_test / 255. keras.backend.clear_session() np.random.seed(42) tf.random.set_seed(42)
a: Estimate a neural network with epochs =20 and one hidden layer with 400 neurons. Measure and report validation accuracy and estimation time.Explain your results. If needed, explain which additional
b: With the same data build a model with two hidden layers [150, 70, 30] neurons. Create two outputs: prediction of a each digit and the prediction of even/odd. Give equal probabibility to each output. If needed, explain which additional algorithm or extra assumption you used for your answer.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps