A) Train the network for k epochs, then using warm start continue…

Question Answered step-by-step A) Train the network for k epochs, then using warm start continue… A) Train the network for k epochs, then using warm start continue the training for another k epochs. B) Randomly divide the MNIST dataset into three part: train1 (50000), train2(10000), test (10000). Make sure that all number classes are presented in both train1, and train2. FULL CODE BELOW (Using MNIST dataset with MLPClassifier): from IPython.display import Mathfrom IPython.display import Lateximport numpy as npimport osimport structfrom sklearn.metrics import classification_report,confusion_matrixfrom sklearn.neural_network import MLPClassifier# loading the MNIST data set. from sklearn.datasets import fetch_openmlfrom sklearn.model_selection import train_test_splitX, y = fetch_openml(‘mnist_784′, version=1, return_X_y=True)y = y.astype(int)X = ((X / 255.) – .5) * 2X_train, X_test, y_train, y_test = train_test_split( X, y, test_size=10000, random_state=123, stratify=y)mlp_mnist = MLPClassifier(verbose = True, hidden_layer_sizes=(50,), batch_size = 3, max_iter=50, solver=’sgd’, activation=’logistic’, learning_rate = ‘constant’, learning_rate_init = 0.001, random_state=1) mlp_mnist.fit(X_train,y_train)# https://scikit-learn.org/stable/modules/generated/sklearn.neural_network.MLPClassifier.htmlhttps://pypi.org/project/mnist/  Computer Science Engineering & Technology Python Programming CS 675 Share QuestionEmailCopy link Comments (0)