每次我尝试运行从AutoKeras.com示例页面上第一个示例中复制的非常基本的代码时,Google Colab运行时都会终止。
我的笔记本的链接是: Test Code
代码如下:
from keras.datasets import mnist
from autokeras.image_classifier import ImageClassifier
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)
clf.fit(x_train, y_train, time_limit=12 * 60 * 60)
clf.final_fit(x_train, y_train, x_test, y_test, retrain=True)
y = clf.evaluate(x_test, y_test)
print(y)
代码一直运行到
Using TensorFlow backend.
Downloading data from https://s3.amazonaws.com/img-datasets/mnist.npz
11493376/11490434 [==============================] - 2s 0us/step
Initializing search.
Initialization finished.
Training model 0
然后运行时终止。这与是否包括GPU或运行时仅是CPU无关。
ETA:在Kaggle上观察到相同的行为,其中内核在同一点死亡。