keras-team / keras

Deep Learning for humans
http://keras.io/
Apache License 2.0
62.05k stars 19.48k forks source link

forrtl: error (200): program aborting due to control-C event #7432

Closed tswc closed 6 years ago

tswc commented 7 years ago

I was using the standard code, that I found in the internet. This code is about using scikit-learn to select the parameter by using Keras. I am using the code here http://machinelearningmastery.com/grid-search-hyperparameters-deep-learning-models-python-keras/ I am not sure if this problem is because of keras or scikit-learn.

import numpy
from sklearn.grid_search import GridSearchCV
from keras.models import Sequential
from keras.layers import Dense
from keras.wrappers.scikit_learn import KerasClassifier
# Function to create model, required for KerasClassifier
def create_model():
    # create model
    model = Sequential()
    model.add(Dense(12, input_dim=8, activation='relu'))
    model.add(Dense(1, activation='sigmoid'))
    # Compile model
    model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
    return model
# fix random seed for reproducibility
seed = 7
numpy.random.seed(seed)
# load dataset
dataset = numpy.loadtxt("pima-indians-diabetes.csv", delimiter=",")
# split into input (X) and output (Y) variables
X = dataset[:,0:8]
Y = dataset[:,8]
# create model
model = KerasClassifier(build_fn=create_model, verbose=0)
# define the grid search parameters
batch_size = [10, 20, 40, 60, 80, 100]
epochs = [10, 50, 100]
param_grid = dict(batch_size=batch_size, nb_epoch=epochs)
grid = GridSearchCV(estimator=model, param_grid=param_grid, n_jobs=-1)
grid_result = grid.fit(X, Y)
# summarize results
print("Best: %f using %s" % (grid_result.best_score_, grid_result.best_params_))
for params, mean_score, scores in grid_result.grid_scores_:
    print("%f (%f) with: %r" % (scores.mean(), scores.std(), params))

Then I got some errors.

Using Theano backend.
Using cuDNN version 5110 on context None
Mapped name None to device cuda0: GeForce GTX 750 Ti (0000:01:00.0)
Using Theano backend.
Using Theano backend.
Using Theano backend.
Using Theano backend.
Using Theano backend.
Using Theano backend.
Using Theano backend.
Using Theano backend.
Using cuDNN version 5110 on context None
forrtl: error (200): program aborting due to control-C event
Image              PC                Routine            Line        Source             
libifcoremd.dll    00007FF9860443E4  Unknown               Unknown  Unknown
KERNELBASE.dll     00007FF99B2A5674  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FF99C0B2D92  Unknown               Unknown  Unknown
ntdll.dll          00007FF99DF89F64  Unknown               Unknown  Unknown
forrtl: error (200): program aborting due to control-C event
Image              PC                Routine            Line        Source             
libifcoremd.dll    00007FF9860443E4  Unknown               Unknown  Unknown
KERNELBASE.dll     00007FF99B2A5674  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FF99C0B2D92  Unknown               Unknown  Unknown
ntdll.dll          00007FF99DF89F64  Unknown               Unknown  Unknown
forrtl: error (200): program aborting due to control-C event
Image              PC                Routine            Line        Source             
libifcoremd.dll    00007FF9860443E4  Unknown               Unknown  Unknown
KERNELBASE.dll     00007FF99B2A5674  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FF99C0B2D92  Unknown               Unknown  Unknown
ntdll.dll          00007FF99DF89F64  Unknown               Unknown  Unknown
forrtl: error (200): program aborting due to control-C event
Image              PC                Routine            Line        Source             
libifcoremd.dll    00007FF9860443E4  Unknown               Unknown  Unknown
KERNELBASE.dll     00007FF99B2A5674  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FF99C0B2D92  Unknown               Unknown  Unknown
ntdll.dll          00007FF99DF89F64  Unknown               Unknown  Unknown
forrtl: error (200): program aborting due to control-C event
Image              PC                Routine            Line        Source             
libifcoremd.dll    00007FF9860443E4  Unknown               Unknown  Unknown
KERNELBASE.dll     00007FF99B2A5674  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FF99C0B2D92  Unknown               Unknown  Unknown
ntdll.dll          00007FF99DF89F64  Unknown               Unknown  Unknown
forrtl: error (200): program aborting due to control-C event
Image              PC                Routine            Line        Source             
libifcoremd.dll    00007FF9860443E4  Unknown               Unknown  Unknown
KERNELBASE.dll     00007FF99B2A5674  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FF99C0B2D92  Unknown               Unknown  Unknown
ntdll.dll          00007FF99DF89F64  Unknown               Unknown  Unknown
forrtl: error (200): program aborting due to control-C event
Image              PC                Routine            Line        Source             
libifcoremd.dll    00007FF9860443E4  Unknown               Unknown  Unknown
KERNELBASE.dll     00007FF99B2A5674  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FF99C0B2D92  Unknown               Unknown  Unknown
ntdll.dll          00007FF99DF89F64  Unknown               Unknown  Unknown
forrtl: error (200): program aborting due to control-C event
Image              PC                Routine            Line        Source             
libifcoremd.dll    00007FF9860443E4  Unknown               Unknown  Unknown
KERNELBASE.dll     00007FF99B2A5674  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FF99C0B2D92  Unknown               Unknown  Unknown
ntdll.dll          00007FF99DF89F64  Unknown               Unknown  Unknown
forrtl: error (200): program aborting due to control-C event
Image              PC                Routine            Line        Source             
libifcoremd.dll    00007FF9860443E4  Unknown               Unknown  Unknown
KERNELBASE.dll     00007FF99B2A5674  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FF99C0B2D92  Unknown               Unknown  Unknown
ntdll.dll          00007FF99DF89F64  Unknown               Unknown  Unknown

I have no idea what happens.

mswellhao commented 7 years ago

Have you solved this issue? I meet the same problems as yours. If you have got any solution, please let me know.

Thanks

stale[bot] commented 7 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed.

codracker commented 4 years ago

I am facing the same issue, Can you help?

HajunKim commented 4 years ago

me, too anybody can help?

TobeMagic commented 2 years ago

i meet the same problem,if you solved this, tell me in this comment please,think you very much

richdear commented 1 year ago

Sam issue!

Marsomatic commented 10 months ago

I am facing the same issue, pls help