Created
April 23, 2019 05:18
-
-
Save vivek081166/589d9540a8ef434cd2017097c6eb8f9a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.datasets import mnist | |
from autokeras import ImageClassifier | |
from autokeras.constant import Constant | |
if __name__ == '__main__': | |
(x_train, y_train), (x_test, y_test) = mnist.load_data() | |
x_train = x_train.reshape(x_train.shape + (1,)) | |
x_test = x_test.reshape(x_test.shape + (1,)) | |
clf = ImageClassifier(verbose=True, augment=False) | |
clf.fit(x_train, y_train, time_limit=30 * 60) | |
clf.final_fit(x_train, y_train, x_test, y_test, retrain=True) | |
y = clf.evaluate(x_test, y_test) | |
print(y * 100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment